A
azuarf
Guest
I added a collision event for player with wall.
and here is my code for player movement in a step event. its pretty basic.
when player object is colliding with the wall and i am pressing two buttons the player dose not move.
eg... when i press "W + A" the player object moves diagonally Up + Left, but when it collides with the wall it comes to a complete halt. how to make it so that the object dose not come to a complete halt when pressing two buttons(moving diagonally) when in collision with the wall and moves perpendicular.
my collision event is just a collision event with a comment inside. both objects are solid.
it just dose not look immersive.
and here is my code for player movement in a step event. its pretty basic.
Code:
if(global.pl_mov_state = 1)
{
if(keyboard_check(ord("W")))
{
y -= global.pl_speed;
}
if(keyboard_check(ord("A")))
{
x -= global.pl_speed;
}
if(keyboard_check(ord("S")))
{
y += global.pl_speed;
}
if(keyboard_check(ord("D")))
{
x += global.pl_speed;
}
}
eg... when i press "W + A" the player object moves diagonally Up + Left, but when it collides with the wall it comes to a complete halt. how to make it so that the object dose not come to a complete halt when pressing two buttons(moving diagonally) when in collision with the wall and moves perpendicular.
my collision event is just a collision event with a comment inside. both objects are solid.
it just dose not look immersive.