Changing image depending on position of touch.
Taidaken
Member Posts: 271
Hey guys, was just wondering if anyone knew of a method that could help me when, lets say for example a helicopter, i tapped on the upper left of the screen where i want it to go and it flew towards the left to where i touched, and if i touched to the right of it, it would change the image/animation in the other direction, instead of just flying backwards towards where i touched on the right. so that it always changed to the right image set depending on which direction i touched. if anyone has any suggestions it would help out alot. thanks in advance.
Comments
Have a rule if touch1 position is less then game.helicopters Y
Change to facing down image
If touch is greater then y
Change to facing up
If touch position is less then game.helicopter X
Change to facing right
If touch is more then X
Change to facing left image
Hope that helps and all the best