ShiVa3D
swipe an object out of the screen
iOS Development and xCode questionsswipe an object out of the screen
by d4dhanuj » 27 Feb 2012, 12:25
Hi friends I am making an game in which many object will be moving in my screen ( like mouse hunt ) i have to select them and through it out of the screen and the object should move in which direction I am moving my finger.
Can any one tell me how i should get the direction in which rest of the movement should be made.
Can any one tell me how i should get the direction in which rest of the movement should be made.
- d4dhanuj
- Fresh Boarder

- Posts: 18
Re: swipe an object out of the screen
by capiright » 27 Feb 2012, 19:20
1. On the initial touch set that point as your origin
2. Track the movement and when you pass a certain distance from your origin you can make it your direction vector (p1 - p0)
2. Track the movement and when you pass a certain distance from your origin you can make it your direction vector (p1 - p0)
You know you like us...
http://www.facebook.com/SunDriedGames
http://www.facebook.com/SunDriedGames
-

capiright - Platinum Boarder

- Posts: 516
2 posts
• Page 1 of 1