I am toying with adding movement in my game that essentially follows an arc'd path. Can anyone point me in a direction for this or offer tips?
Arc for movement
(4 posts) (3 voices)-
Posted 1 year ago #
-
I have made an arrow shooting game and needed some trigonometry refresher. This site has some good 2D game physics code/math. It isn't objective-C but is well written and easy to understand what they are doing to port it.
http://www.rodedev.com/tutorials/gamephysics/
I'm not sure exactly what you are trying to do, have player draw the path or follow a preset arc, or make a bullet arc/fall w/ gravity etc. I'm sure with some specifics someone here has done something similar already that could offer a pointer. For simple physics, just using the math sin/tan/atan/etc is usually pretty easy/fast, but if you want to do more physics based stuff, chipmunk or box2d physics engines included with cocos2d are pretty cool.
Posted 1 year ago # -
Have you checked out the new bezier actions?
There's an example in the SpritesTest demo.Posted 1 year ago # -
I am wanting to do the traditional bullet shot up, arc then fall across the screen. I didn't realize that we had bezier actions now. I haven't tinkered in 0.8 yet but I might have to give it a look and upgrade.
Posted 1 year ago #
Reply
You must log in to post.