Vehicle Controller

This
controller is used to create a wheeled vehicle like a car. The car body
is a rigid body and each wheel is simulated by a raycast. The ray's
intersection point is used to calculate the suspension length and the
suspension force. The suspension force is used to stop the body from
hitting the ground. For each wheel ray that hit the ground contact
forces are also calculated and they drive and steer the car.
Documentation links for vehicle controller in Bullet and PhysX. Settings below for Bullet.

wheelRadius : radiRadius of the wheel. Should fit the render mesh of the wheel.

connectionPointCS0 Start of raycast relative to car body. The point where the suspension connects to the chassis.

wheelDirectionCS0 Direction
of raycast relative to car body. Straight down is a good start. The
length of the ray is m_suspensionRestLength1 + wheelRadius.

wheelAxleCSAxis direction of wheel relative to car body. Selects what the zero direction is for wheel steering.

Suspension Settings

suspensionRestLength : restlWhats
the default position of the wheel if not in contact with ground. The
maximum length of the suspension in metres. It's wheel center will then
be at connectionPointCS0 + wheelDirectionCS0 * m_suspensionRestLength1.

m_maxSuspensionTravelCm : susp

The maximum distance the suspension can be compressed in centimeters.

m_suspensionStiffness : stiffThe
stiffness constant for the suspension. How much force the suspension
give on the chassi when the wheel is not in the default position. 10 -
offroad buggy, 50 - sports car, 200 - F1 car.