track the swipe (going left or right when release)
jorkos
Member, PRO Posts: 353
I have a game where the main character moves back and forth. When you touch the screen the actor stops. When you release I want the direction that the actor goes to be based on the swipe direction (so if i touch the screen and swipe right the character would go right). What's the simplest way to implement this? Thanks for your help gang
Comments
Record mouse.position.X when the mouse is pressed. Then record mouse.position.X when the mouse is released. If the release position is greater than press position then the swipe is right. Otherwise it is left.