[ODE] Removing forces from a body

Brad Hittle bhittle at osc.edu
Thu Nov 3 15:47:33 MST 2005


Hi Everyone,

We have a virtual environment, in which we add cylinders, spheres, and
boxes.  What we would like to do is select these with our 'wand', move
the object to another position and drop it, or build up a force to throw
it somewhere.  What I have been doing is disabling a body when the user
selects it, and can then move the object around in the scene.

The problem occurs when they let go of the object.  It acts like it has a
multitude of forces that it hasn't reacted with and it starts to react
then.

For example, if an object is laying on the ground, you would pick it up
and drop it and see it fall at an accelerated rate.  What is actually
happening in my current setup is that the object falls at a very fast
rate, and begins to rotate and move in odd directions.

So my question is, is there any way to nullify all the forces on a body,
so that when the user drops or throws the item, the forces acting upon
the object will only be gravity and or a force I calculate and apply to
the object?

I have tried removing the force, linear velocity, angular velocity, and
torque by adding a force in the opposite direction of equal strength,
but this doesn't work.  Also, I didn't find anything on the faqs on
the topic of removing forces from a body, although I could have not
seen/overlooked the topic.

Thanks alot for the help!

-brad




More information about the ODE mailing list