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
Transform all moment applied to a body to torque
-
- Posts: 4
- Joined: Wed Oct 30, 2013 7:38 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Transform all moment applied to a body to torque
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.
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/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 4
- Joined: Wed Oct 30, 2013 7:38 am
- Contact:
Re: Transform all moment applied to a body to torque
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
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Transform all moment applied to a body to torque
You want to use the cpBodySetTorque() function then.
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/
Who is online
Users browsing this forum: No registered users and 1 guest