Player Rotation

Hello, I am new to GDevelop and I am trying to make my player rotate to stairs, I am using the Platformer Character Behavior, can anyone help me?

Not sure if I understand your question. Do you mean you want your character sprite to rotate upwards like a 45 degree angle when he is going up some stairs?

yeah exactly, but i dont know how to do that

You should be able to do that with “Rotate Toward Angle”, which you can choose as an Action.

http://wiki.compilgames.net/doku.php/gdevelop5/objects/base_object/events#angle

So assuming your stairs are a separate object on their own… You could do something like this…

[Condition] Player is in collision with Stairs

[Action] Rotate Player toward 45 with speed 0

Mess around with the rotation angle (45) and speed (0) to see what works for your game. A speed of 0 means it will rotate instantly, but you can try out different speeds of the rotation to see what works best.

Angle 0 is dead to the right and it increases clockwise, so 45 will make the character have its head pointing to the down-right.

It’d have to be either -45 and -135 or 225 and 315

Unless everything is upside down lol.

Sorry for being a smartass