Vehicle Setup Guide

This guide assumes you have your vehicle rigged according to the Creating a Vehicle section. Your vehicle should have already passed the first test drive.



Mass

Set the vehicle's mass at the rigidbody.

Suspension

The suspension is configured per-wheel at the VPWheelCollider components.

The suspension distance (m) should be configured for matching the vehicle's specifications.

The anchor (%) simply defines how much the suspension is compressed in the 3D model (in Edit time). 0 means the suspension is fully extended and can only be compressed from the original position. 1 means the suspension is fully compressed and can only be extended. 0.5 means the suspension is half compressed.

Springs

Springs sustain the weight of the vehicle. As rule of thumb, configure the spring rate (N/m) so each suspension can support up to twice of the distributed weight. The maximum weight of each wheel is displayed at the VPWheelCollider inspector.

Example:

Thus, if the weight is evenly distributed at rest each suspension would be at half of its travel.

Of course, you can always apply real values to the springs or any other values that fit better with your vehicle.

Dampers

Dampers (aka shock absorbers) limit the suspension movement and damp the spring oscillations. The damper setup affects the angular momentum of the vehicle on weight shifting situations (accelerating, braking, cornering...).

The damper rate (N/ms-1) should be configured so the oscillating behavior resembles the real vehicle. You can drop the vehicle from some height (Enter key by default) and observe the result. A rough starting point for the damper rate is around 1/10 of the spring rate.

Center of Mass

Add a gameobject to the vehicle and name it CoM. Set its reference at VPVehicleController > Center Of Mass. You might want to set Runtime Com Changes as "Editor Only", so you could modify the position of the CoM and see the results in runtime.

Longitudinal position of the CoM (Z):

Vertical position of the CoM (Y):

The sideways position of the CoM (X) should be 0 (middle of the vehicle).

After configuring the CoM you will probably need to make adjustments to the suspension for accommodating the new weight distribution. Typically, the spring rates should be adjusted so all suspensions reach the same compression ratio at rest. The damper rates should also be fine tunned accordingly as well.

Engine

[TO-DO: Engine graphic]

The engine torque curve is the sum of two curves: ideal torque curve (dotted orange) and friction torque curve (dashed red). The result of adding those curves together is the final engine torque curve (green). When you watch at a dyno torque curve you're really watching this green curve.

The final torque curve is guaranteed to cross three key values:

The Curve Bias parameters have some influence in the transitions between Ilde and Peak.

The friction torque curve produces the engine brake effect when no throttle is applied. Its settings have also effect on the shape of the final torque curve:

The effect of the friction parameters can be lively observed at the graph.

The inertia defines how much "efforth" takes to modify the rpms in the engine. Formula 1 style engines have very little inertia (0.1-0.2), while trucks have a large inertia in their engines (8-10). Standard cars are around 0.4 and 1.

If the engine Can Stall the parameters can be configured as well:

Pro-Tip

The Starter Reliability can be used to simulate external factors such as drained batteries, cold temperatures, mechanical failures, and so on.

Pro-Tip

As happens in reality, a stalled engine can also be restarted inertially. That is leaving the vehicle running down a slope in neutral, then engaging a gear and releasing the clutch.

Gearbox

The Transmission type can be either manual or automatic:

[TO-DO: Pics of manual vs. automatic transmissions]

The Gear Ratios define the power ratio that is applied to the engine torque. If the first gear ratio is 3.84, this means that the torque at the output of the gearbox in first gear will be 3.84 times the torque applied by the engine. The rotational velocity will be 3.84 times slower as well.

Any number of gears and ratios can be configured for both forward and reverse gears. Standard cars have 4 - 6 gears. Trucks can have 12, 18 or even more.

[TO-DO: Pics of car vs gear ratios]

Requirements for gear ratios are:

In order not to change gear up if the drive wheels have lost their traction, the Auto shift mode only engages the 2nd gear if the vehicle's speed is above the 2nd gear min speed (m/s) value.

The Park mode is characteristic of the Automatic transmissions, but it can be simulated in Manual transmissions as well (Allow Park mode).

Driveline

Differential(s)

Torque splitter

Steering

Brakes

Retarder brake