MaxLos
Member
Hihi,
I currently have my player object rotate whenever it's on a slope. Player rotates fine but I'm having trouble figuring out how to only rotate the player when their fully on the slope. Right now I have it set up to just draw the sprite at the right angle whenever it's colliding with a slope like so:
But that causes it to rotate the sprite if the collision mask even touches the slope by 1 pixel (gif below). I'm thinking I should do the collision check at the bottom center but i dunno how I would go about doing that
Any help would be appreciated thanks
I currently have my player object rotate whenever it's on a slope. Player rotates fine but I'm having trouble figuring out how to only rotate the player when their fully on the slope. Right now I have it set up to just draw the sprite at the right angle whenever it's colliding with a slope like so:
Code:
if (grounded)
{
if place_meeting(x,y+1,obj_slope_right) draw_angle = 45;
else if place_meeting(x,y+1,obj_slope_left) draw_angle = -45;
else draw_angle = 0;
}
Any help would be appreciated thanks