What does cpBodyApplyForce() do?

Discuss new features and future development.

What does cpBodyApplyForce() do?

Postby alexppp » Fri May 04, 2012 3:00 am


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


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.
Posts: 1
Joined: Fri May 04, 2012 2:38 am

Re: What does cpBodyApplyForce() do?

Postby slembcke » Fri May 04, 2012 8:57 am

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/
User avatar
Site Admin
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest