What does cpBodyApplyForce() do?

Discuss new features and future development.
Post Reply
alexppp
Posts: 1
Joined: Fri May 04, 2012 2:38 am
Contact:

What does cpBodyApplyForce() do?

Post by alexppp »

Hi,

I have a circular body with a certain moment of inertia anchored at its center to a static body with a pivot joint:

Image

I'm applying the force as in the picture, but I'm not sure how the system is supposed to behave? In my program the body just accelerates indefinitely. I was expecting it to come to a standstill after about a quarter of a turn though?

Thanks in advance.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: What does cpBodyApplyForce() do?

Post by slembcke »

cpBodyApplyForce() adds a force to a body, but forces don't reset themselves. If you want them to, you need to call cpBodyResetForces() somewhere at the beginning of your step.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests