Page 1 of 1

What does cpBodyApplyForce() do?

Posted: Fri May 04, 2012 3:00 am
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.

Re: What does cpBodyApplyForce() do?

Posted: Fri May 04, 2012 8:57 am
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.