[ODE] Programmer request (car physics)

Jon Watte hplus-ode at mindcontrol.org
Thu Jul 29 03:14:21 MST 2004


> - not use angularVelocity or at least reduce it's weight

I think so.

> - better using car->GetLinearVelocity() ?

No. It's the tire rolling, not the car. When you turn the wheels, you want the slip to be reflected in that. Using tire->linearvelocity isn't quite right, because the tire may be moving in the car's direction, even when the tire is turning. Instead, you should calculate the cross of the tire rotation axis and the ground up vector, and use that as fdir1. This correctly takes steering direction into account.

> - set slip1 to zero

You should set the dContactSlip2 flag, and if you don't set dContactSlip1, then it doesn't matter what you set slip1 to. At least, that's what the docs say -- I memset the entire thing to 0 before filling it out.

> suppose a car with front traction. should I set slip only for 
> the two wheels with traction or for the whole four wheels?

All wheels.

Cheers,

			/ h+




More information about the ODE mailing list