Tokamak Physics Thread 5

Blitz3D Forums/Blitz3D Userlibs/Tokamak Physics Thread 5

Basically you cast a ray from the centre position of the wheel(where it should be in its rest position) straight down. If the ray hits something and the distance from the contactpoint to the wheel-centre is within a certain range(for example 1.0 if the suspension length is 1.0) then apply a force at the wheel-centre using the ray's normal to get the force-direction and the distance to calculate the amount of force. Some damping has to be applied as well to keep the car from oscillating too much.
Repeat this for every wheel/ray.

Basically you make the car hover.

Then comes the tricky part.
Applying friction force, driving force and drag.
Since the car hovers there is no friction at all so you have to fake wheel friction.
Driving force is a matter of pushing the car from behind and apply proper torque on the turning axis to make the car steer.
Drag should be most simple as you damp the car's velocity based on it's speed.

If I manage to get my raycast car working I will try to explain this better.