Here's my drifty RWD setup for your pleasure:
Tyres
datablock WheeledVehicleTire(GrottiniTire)
{
// Tires act as springs and generate lateral and longitudinal
// forces to move the vehicle. These distortion/spring forces
// are what convert wheel angular velocity into forces that
// act on the rigid body.
shapeFile = "./racecarwheel.dts";
mass = 10;
radius = 1;
staticFriction = 4.5;
kineticFriction = 4;
restitution = 0.5;
// Spring that generates lateral tire forces
lateralForce = 8000;
lateralDamping = 500;
lateralRelaxation = 1;
// Spring that generates longitudinal tire forces
longitudinalForce = 8000;
longitudinalDamping = 500;
longitudinalRelaxation = 1;
};
datablock WheeledVehicleTire(GrottiniFrontTire)
{
shapeFile = "./racecarwheel.dts";
mass = 10;
radius = 1;
staticFriction = 3;
kineticFriction = 4;
restitution = 0.5;
lateralForce = 8000;
lateralDamping = 500;
lateralRelaxation = 1;
longitudinalForce = 8000;
longitudinalDamping = 500;
longitudinalRelaxation = 1;
};
The vehicle itself:
function GrottiniVehicle::onAdd(%this,%obj)
{
parent::onadd(%this,%obj);
%obj.setWheelTire(0, GrottiniFrontTire);
%obj.setWheelTire(1, GrottiniFrontTire);
%obj.setWheelTire(2, GrottiniTire);
%obj.setWheelTire(3, GrottiniTire);
%obj.setWheelSpring(0, Grottinispring);
%obj.setWheelSpring(1, Grottinispring);
%obj.setWheelSpring(2, Grottinispring);
%obj.setWheelSpring(3, Grottinispring);
%obj.setWheelPowered(0, false );
%obj.setWheelPowered(1, false );
%obj.setWheelPowered(2, true );
%obj.setWheelPowered(3, true );
%obj.setWheelSteering(0,1);
%obj.setWheelSteering(1,1);
%obj.setWheelSteering(2,0);
%obj.setWheelSteering(3,0);
%obj.mountable = true;
}