Some advice with vehicle handling

kutraj
Posts: 1
Joined: Wed Jul 07, 2010 3:37 pm

Some advice with vehicle handling

Post by kutraj »

Hi!

I'm trying to implement some vehicle physics for a simulation using the btRaycastVehicle structure.

First, I think it might help if I explain the current status. I've read the brief document by Kester Maddock and tried all of the suggestions for the various wheel structure constants.

The trouble I'm having is that the vehicle handling does not seem very correct. In a typical (a sportscar, say) simulation, wouldnt you experience a comparatively larger oversteer at lower velocities? I've tried recreating this by making the steering increment dependent on vehicle velocity, something similar to the snippet below (mChassis is a btRigidbody):

Code: Select all

float speed = mChassis->getLinearVelocity().length();
steeringIncrement = ((maxSpeed - speed)/maxSpeed)*basicIncrement;
Here, maxSpeed is obtained heuristically. The steeringIncrement is clamped to between basicIncrement and close to 0, so it should depend inversely with velocity - as the linear speed increases, the amount of increment is reduced. Another alternative to this is to make it inversely proportional to velocity, I've tried that as well. Of course the value of the steeringIncrement is updated every frame and is used when a key is pressed for turning.

The trouble seems to be that the vehicle still oversteers at high speeds. I mean the vehicle has understeer at lower velocities and oversteer at higher velocities. I've even tried to decrease the friction, but the vehicle slides around too much beyond a point, and above that it doesnt seem to help either.

I'd be happy if anyone could offer any suggestions on this matter.

Thanks a ton!