Animate when actor is dragged across the screen
Boorje75
Member Posts: 13
Hi!
So my actor is being moved across the screen when dragging the finger across the screen. It's working perfectly, however I want to be able to create an animation when the actor is pulled to the right and one animation when the actor is pulled to the left. Any ideas on how I can do this?
Comments
3 Attributes are needed.
InitialX, XOnMove, Clicked
InitialX changes when you PRESS the movable actor.
XOnMove,constrain to X of the movable actor. (It updates the value every 0.03 seconds if I am right)
Clicked changes to 1 when the actor is PRESSED and the mouse is inside.
Clicked changes back to 0 when above is not correct.
Rule
If XOnMove > IntialX
If Clicked = 1
Animate
Rule F Xonmove <intialX
If Clicked = 1
animate other thing.
Note: I havent tried it but give it a shot.