开发者

toss an object in tossed direction

开发者 https://www.devze.com 2023-02-03 14:51 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消