Possible to change Angular Velocity?
Posted: Thu Sep 30, 2010 11:18 am
Hi all!
I create a Slide Joint which is attached on one side to a rogue body and on the other side to a movable body.
I apply impulses to move the movable body in all four directions.
When I press "left" (i.e apply impulse (-1,0) ) the movable body moves almost 3/4th to the top, and then falls down again. Ditto with the "right"(apply impulse (1,0)).
If I can add to angular velocity, this problem can be solved completely by holding a flag on which button was being pressed.If the button changes, I'll reduce the angular velocity. The problem is, I've been unable to find a function / method to change angular velocity of a body.
Will I have to compute the angular velocity?(shudder). I don't know how to so some math info would be cool. If it's possible, I'd like to know how.
Thanks all!
P.S I'm new to chipmunk and programming as a whole! I'm using C++, SDL for graphics n chipmunk for physics.
I create a Slide Joint which is attached on one side to a rogue body and on the other side to a movable body.
I apply impulses to move the movable body in all four directions.
When I press "left" (i.e apply impulse (-1,0) ) the movable body moves almost 3/4th to the top, and then falls down again. Ditto with the "right"(apply impulse (1,0)).
If I can add to angular velocity, this problem can be solved completely by holding a flag on which button was being pressed.If the button changes, I'll reduce the angular velocity. The problem is, I've been unable to find a function / method to change angular velocity of a body.

Will I have to compute the angular velocity?(shudder). I don't know how to so some math info would be cool. If it's possible, I'd like to know how.
Thanks all!
P.S I'm new to chipmunk and programming as a whole! I'm using C++, SDL for graphics n chipmunk for physics.