ode local forces

When I set a force on a body, it slides around, but I want it to only move in the object’s y direction.

Before using ode, I would use something like player.setPos( player, 0, newPos, 0), which is the effect I am trying to achieve. I would still like external forces to have an effect on the object.

As I read from the RoboCup ODE site, “You may set velocity and angular velocity in the initial state. Setting those in every simulation step is not recommended. It abuses your physics model.” It finishes by saying, “If you want to control the speed of an object. Please use a joint motor.”

I tried joint motors, but couldn’t figure them out. Does anyone have any guidance for me?

hmm…what is the structure your body ? For simple body, use setForce shall be good enough to make a simulation. Can you post your code to see why and how it slides ?

If your body is complicated, say contains joints, you can use motors to control the joints. (e.g. a car, a robot arm…)

The motor control comes with ode can make simple simulation on simple motor. But if you want a servo motor type control, you need to write a bit more on setting an angle target with timing control.

Don’t you know that the force is relative to the world ?
If you want it relative to the body, use addRelForce().

a programer from russia build a ode sample
http://panda3d.org.ru/load/0-0-0-10-20

and other samples are in the official manual ode section

hope you can find some inspiration

sophos