[ODE] Car simulation (with no wheels) - clever ideas needed

Jon Watte hplus-ode at mindcontrol.org
Fri Mar 19 10:00:29 MST 2004


> > You might try making both of those very high - the static friction of
> > rubber on pavement is very high in all directions.

> But a car isn't /that/ hard to move forwards - I could push one. But I
> obviously can't push a car sideways!

You're not thinking physical simulation here. Are your balls actually rolling?

The cheap-ass way to model a car is something like a box with four balls attached to it. The balls have HIGH friction against ground, but are allowed to rotate against the box.

To apply gas, you apply an amotor on the balls to make 'em spin, which will use traction against the ground to push the car forward.

To steer, you twist the axis of rotation for the front wheels around the up vector.

What you said you were doing was applying a force on the box itself, as if there was a jet engine mounted on the car. That's not likely to give car-like handling.

Once you get this cheap-ass car going, you'll notice that there's a reason there's a Hinge2 joint; cars usually need suspension ;-) If using four balls with hinge2 joints and a box is too expensive for your pile-ups, you could detect pile-ups, and turn off the joints for the balls, just simulate one body that's the box + balls with some friction against ground, for vehicles involved in the pile-up.

Cheers,

			/ h+




More information about the ODE mailing list