toss an object in tossed direction
I've been trying to create a function to toss an object using 'touch' and make it go in a straight line with the direction it was tossed in, ve开发者_开发知识库ry close to "paper toss". any ideas? thanks!
There's a great tutorial on how to build this sort of code: http://www.raywenderlich.com/25791/rotating-turrets-how-to-make-a-simple-iphone-game-with-cocos2d-2-x-part-2
It will give you the straight line. You would have to add a scaling function if you need depth. Paper Toss will vary to this based on the path drawn - they use a bezier curve.
Better late than never. Cheers.
精彩评论