Hi everyone,
I’m trying to recreate a mechanic similar to Slendytubbies 2D in GDevelop, where the player “looks” at the mouse and the animations change based on the cursor direction.
Any tips or examples on how to structure this?
Thanks!
Hi everyone,
I’m trying to recreate a mechanic similar to Slendytubbies 2D in GDevelop, where the player “looks” at the mouse and the animations change based on the cursor direction.
Any tips or examples on how to structure this?
Thanks!
The player object is not rotating, so the player angle will never change.
I’d suggest you use PLAYER.AngleToPosition(CursorX(), CursorY()) to get the angle from player to mouse, and the following events to determine which animation to use:
Note, for the angles (in degrees):
0 is right,
-90 (also 270) is up
90 is down
180 (also -180) is left
This results in:

Thank you for your help. ![]()