Torque only shows effect with collision?

TrackGuy

24-08-2006 14:36:07

Hello,

I made a sphere and put gravity force on it. Everything works fine and works as expected.

If I turn off the gravity for the sphere and put the sphere on the ground (plane with collision) in that way that the sphere collides with the plane all changes of the torque values have an effect and the sphere rolls in different directions (depending on torque values) on the plane. So far so good.

But if I put the sphere in the air (little distance above the plane so it does not collide, gravity is off so it stays in the air), my changes to the torque value will not result in a rotation of the sphere.

Is this behaviour a feature or a bug?

regards

walaber

24-08-2006 15:50:56

you are applying the torque from inside a ForceCallback, right?

Are you sure that the body is not "falling asleep"? if there is no movement/torque for several frames, the body will be removed from the active body list, and it's callback will no longer be called.

when you get some keyboard input (to add torque for instance), try calling Unfreeze on the body to make sure the callback is getting called.

TrackGuy

24-08-2006 20:13:51

Hi Walaber,

you are applying the torque from inside a ForceCallback, right?


Right!


Are you sure that the body is not "falling asleep"? if there is no movement/torque for several frames, the body will be removed from the active body list, and it's callback will no longer be called.


You are right! I think that is the reason. Will test this tomorrow!


when you get some keyboard input (to add torque for instance), try calling Unfreeze on the body to make sure the callback is getting called.


Thank you very much. I am sure that this was the problem.