UPDATE:
== Traction: Rear or 4WD! ==
Next step is creating a car with a rear traction, front traction, or 4WD. Well, it is very easy.
In the source code "physics_car.c" look for "// max. reverse is 1/4 of forward speed" (without apex!). You will find the following code:
// max. reverse is 1/4 of forward speed
vehicle[myID].targetSpeed= clamp(vehicle[myID].targetSpeed, -vehicle[myID].properties.maxAngSpeed*0.25, vehicle[myID].properties.maxAngSpeed);
phcon_setmotor(vehicle[myID].wheelRL, nullvector, vector(vehicle[myID].targetSpeed, locTorque,0), nullvector);
phcon_setmotor(vehicle[myID].wheelRR, nullvector, vector(vehicle[myID].targetSpeed, locTorque,0), nullvector);
If you want to add 4WD system, add the following lines:
if(activate4Tires == 1) {
//FRONT
phcon_setmotor(vehicle[myID].wheelFL, nullvector, vector(vehicle[myID].targetSpeed, locTorque,0), nullvector);
phcon_setmotor(vehicle[myID].wheelFR, nullvector, vector(vehicle[myID].targetSpeed, locTorque,0), nullvector);
}
In this way you can use the variable "activate4Tires" to insert/deactivate 4WD system!
It's great!