[Solved] Left and right direction animation when draggable is applied

Hello, I am a beginner following the tutorial.
How can I change the direction of the face animation
when moving the sprite with the draggable behavior to the right
and left when moving the finger left and right?
(When there is no movement, it faces the front)



Hi, when you start dragging the sprite you can save its current x-position in a variable and compare the value of this variable with the current position of your sprite. If the current x-position is greater than the value of the variable your sprite-animation should be right and if it is smaller it should be left.

Here is an example:

2 Likes

Thank you for your kind explanation. As per your coaching event, it works well. Good!!

1 Like