Transform all moment applied to a body to torque

Official forum for the Chipmunk2D Physics Library.
Post Reply
vervatovskis
Posts: 4
Joined: Wed Oct 30, 2013 7:38 am
Contact:

Transform all moment applied to a body to torque

Post by vervatovskis »

Hi gentlemen,

I have a cpBody in a chipmunk space, I am trying since three days the to detect when moment is applied on a body and apply a force against this one, in other words I want to transform all moment applied on this body to torque I want the body to turn around it self without changing its position, For more precision thr space have a gravity. Any ideas please?
Thanks in advance.

B R
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Transform all moment applied to a body to torque

Post by slembcke »

I don't understand what you are trying to do.

It sounds like you just want to use the cpBodySetTorque() property maybe? Otherwise applying a force will always cause the body to move unless it's canceled out by another force.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
vervatovskis
Posts: 4
Joined: Wed Oct 30, 2013 7:38 am
Contact:

Re: Transform all moment applied to a body to torque

Post by vervatovskis »

Hi, Thank you for your answer, I am trying to develop a tower game, the game consist on superimposing sprites, when enough mass is above a sprite, it turn, what I want is that the sprite turn only without changing position. I hope this is better clear. Thanks
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Transform all moment applied to a body to torque

Post by slembcke »

You want to use the cpBodySetTorque() function then.
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 8 guests