Tilt cube (player) when jumping?


I would like to know how to rotate the cube(player) when jumping to a full 90° before landing again?

Any help appreciated

you can make this two ways

  1. Rotate the animation attached to the hitbox of your player.
    2 Apply Angle to the player hitbox

Im going with 2 as it is easier, but as soon as the player hits the ground the rotation stops.

The condition is as follow. If player is falling then rotate 90°/second witch rotates the cube but the rotation stops as soos as it hits the ground leaving the cube tilted

I think is better to rotate the sprite attached to the player, if this is not possible for your game then try
If player is falling
player is in collision with Floor
set rotate = 0

Thanks will try. I just want the cube to do a smooth 90° turn before hitting the floor no matter how long the jump is.

Try this. I had my Player’s gravity set to 1500 and jump speed at 700, you might need to adjust the rotate speed based on those values.