[ODE] Racing game settings (update)

Jon Watte hplus-ode at mindcontrol.org
Fri Jul 30 00:42:28 MST 2004


> When setting slip2 I have the option of using the angular vel of the 
> wheel or the vel of the chassis in the forward direction or the 
> overall vel of the chassis. I was guessing that (even allowing for 
> wheel slip) that I should use the angular vel of the wheel in the 
> axis2 direction, except I'm not sure how to calc linear or angular 
> vel in a particular axis (I mul'ed the vel and normalised axis2 axis 
> but that ain't right).

I already suggested the following, but it bears repeating:

Calculate a front vector for the wheel as:
   fDir1 = normalize( cross( wheelAxis, groundNormal ) )

If your car is rotated 90 degrees, you'll have to come up 
with something else, but at that point, you're "rolling" the 
entire car rather than the wheel :-)

> The only other real issue I had, and still have, is slight variations 
> in the front wheel direction cause slight steering issues when the 
> wheels should be straight. I did a lot of testing and tried a lot of 

Real cars don't drive straight. Especially not at the forces 
and speeds that you'll cram into a typical arcade game. If you 
want smoother, more game-like physics, I recommend the box 
with four ray casts.

> a preset target vel and throttle-linked torque) is the problem. It is 
> less apparent with foot off the gas. Ideas?

Smaller CFM, higher ERP. Try 1e-5 and 1-1e-4 respectively 
if you're using floats. Or switch to doubles, and use something 
like 1e-8 and 1-1e-8.

You can set the SoftCFM and SoftERP flags and specify the 
CFM/ERP only for these joints, if you don't want to make 
your entire system ultra-stiff.

Cheers,

				/ h+




More information about the ODE mailing list