Here is a brief summary of how the script works.
1) Starting with the current x,z of the vehicle body calculate the terrain height under each wheel.
2) Work out for each axle the angle needed to make the wheels sit on the terrain. (i.e. Roll)
3) Work out the front/back angle (Pitch) needed to sit the back and front wheels on the terrain.
4) Average out all these angles to work out the orientation of the vehicle wrt to the terrain.
5) For each wheel work out the position relative to the axle that it needs to be positioned to touch the terrain, if the wheel exceeds a certain maximum vertical distance from the axle then use that in the calc instead.
6) Work out the tilt of the wheel relative to the axle to simulate the suspension.
7) Work out the turning angle of the wheel wrt to the axle.
8) Work out the rotation angle of the wheel from the speed.
9) Finally position all the wheels and the vehicle using the calculated position.
Then
10) Work out where we need to head for next, i.e. work out the angle needed to point in the direction of the next waypoint.
11) Turn the vehicle in that direction ready for the next frame.
Rinse and repeat until the end of the route is reached.
Been there, done that, got all the T-Shirts!