best way to simulate a glider?
-
- Posts: 2
- Joined: Thu Aug 06, 2009 10:52 pm
- Contact:
best way to simulate a glider?
I am making a game , the main object is a glider, after giving glider a speed, player can control wing's angle to move down or up in the sky. I am considering to apply verticle and horizonal force to the body of glider object depends on the wing's angle. Any better sulotion?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: best way to simulate a glider?
No, that would be the correct way to do it.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 2
- Joined: Thu Aug 06, 2009 10:52 pm
- Contact:
Re: best way to simulate a glider?
cpBodyApplyForce works? it seems that this function apply a force for ever and will accelerate the body.
- Tam Toucan
- Posts: 141
- Joined: Tue Jun 23, 2009 4:26 pm
- Contact:
Re: best way to simulate a glider?
Yes, you need to call cpBodyResetForces(body). Usually you have a "updateForces" function that you call before each cpSpaceStep and reset them (and recalculate) in there.
Who is online
Users browsing this forum: No registered users and 11 guests