E
Ezeeskillz
Guest
I am currently using the dual stick code from this video:
I cannot for the life of me figure out how to get collisions to work with this. The movement code is:
//GAMEPAD L-STICK MOVEMENT
if gamepad_axis_value(0,gp_axislv) >= -deadzone_limit && gamepad_axis_value(0,gp_axislv) <= deadzone_limit
&& gamepad_axis_value(0,gp_axislh) >= -deadzone_limit && gamepad_axis_value(0,gp_axislh) <= deadzone_limit
{
image_angle = direction;
speed = 0;
}
else
{
var hlaxis = gamepad_axis_value(0, gp_axislh);
var vlaxis = gamepad_axis_value(0, gp_axislv);
direction = point_direction(0, 0, hlaxis, vlaxis);
speed = point_distance(0 ,0, hlaxis, vlaxis) * player_speed;
}
Can anyone help me out with this or is there a better way to do the movement code in general.
Thanks!
I cannot for the life of me figure out how to get collisions to work with this. The movement code is:
//GAMEPAD L-STICK MOVEMENT
if gamepad_axis_value(0,gp_axislv) >= -deadzone_limit && gamepad_axis_value(0,gp_axislv) <= deadzone_limit
&& gamepad_axis_value(0,gp_axislh) >= -deadzone_limit && gamepad_axis_value(0,gp_axislh) <= deadzone_limit
{
image_angle = direction;
speed = 0;
}
else
{
var hlaxis = gamepad_axis_value(0, gp_axislh);
var vlaxis = gamepad_axis_value(0, gp_axislv);
direction = point_direction(0, 0, hlaxis, vlaxis);
speed = point_distance(0 ,0, hlaxis, vlaxis) * player_speed;
}
Can anyone help me out with this or is there a better way to do the movement code in general.
Thanks!