VPVehicleControler

The vehicle-equivalent of Unity's character controller. Simulates most types of vehicles.

VP Vehicle Controller

The vehicle controller exposes the settings for the center of mass, axles and powertrain: steering, brakes, tires, driveline, engine, clutch, gearbox and retarder. Other settings for the wheels (radius, mass) and suspension (spring, damper) are configured at each VP Wheel Collider component independently.

You can write your own custom vehicle controller for special types of vehicles not directly covered by the stock Vehicle Controller component.

Center of mass

Transform to be used as Center of Mass (CoM). If not specified, CoM will be calculated out of the vehicle's colliders (not recommended).

The longitudinal position of the center of mass greatly affects the behavior and handling of the vehicle. The vertical position affects the stability.

How to configure the Center of Mass

  1. Create an empty child GameObject in your vehicle (AltShiftN), name it CoM.
  2. Set it as Center of Mass in the vehicle controller.
  3. Move the CoM gameobject to the middle of your vehicle as seen from the top.
  4. Imagine the chassis of the vehicle. Change the vertical position (Y) of the CoM until it "touches" the imaginary chassis from upside.
  5. Move the CoM longitudinally (Z) slightly towards the position of the engine. It should be placed around 2/3 of the length of the vehicle.

When playing around with your vehicle you can adjust its handling behavior by modifying the Z position of the CoM. For modifying the stability move the Y position of the CoM.

Axles

Each axle references the left-right wheels (VPWheelCollider components) and configure its features.

VP Vehicle Controller axles

Left-right wheels

The VPWheelCollider component for each wheel of the axle. Radius, mass, suspension distance, suspension spring, suspension damper and visual meshes are configured at the VPWheelCollider.

Brakes

Which brake system (front, rear, neutral, none) will control the brakes for this axle.

Steering

Steering settings for this axle:

Steering

Steering parameters for the vehicle: angle, Ackerman, toe...

VP Vehicle Controller steering

Details: Steering helper

Brakes

Brake parameters for the vehicle, including brake power, brake balance and handbrake.

VP Vehicle Controller brakes

Details: Brakes helper

Tires

Tire friction model and settings for the wheels of the vehicle.

VP Vehicle Controller tires

Details: Tire friction

Driveline

Configures the driven axles and the elements makes the connections among them and with the drive torque upstream.

VP Vehicle Controller driveline

The driveline settings can define up to 4 driven axles connected in a variety of ways using differentials in several configurations (open, locked) and torque splitters. Each configuration is briefly described in the Editor.

Depending on the chosen configuration, different additional parts will be available for setting up:

Differential or Axle Differential
Differentials connecting two wheels of the same axle.

VP Vehicle Controller differential

Inter-axle Differential
Differentials connecting two axle differentials together before routing the connection upstream to a center differential or torque splitter. Used in 4-driven axles configurations.
Center Differential
Differential connecting two axles or groups (inter-axle or axle differentials) before routing the connection upstream to the drive torque. Used in 2, 3 and 4-driven axles configurations.
Torque Splitter
A device that provides dynamic torque routing among two outputs.

VP Vehicle Controller torque splitter

Details:

Engine

Set up the engine of the vehicle.

VP Vehicle Controller engine

Feel free to play with these values while monitoring the resulting engine performance data in the graph and below it. If the combination of values is not correct a warning will be displayed.

Details: Engine block

Clutch

The clutch couples the engine with the transmission and driveline.

VP Vehicle Controller clutch

Details: Clutch block

Gearbox

Transmission type, gear ratios and transmission settings.

VP Vehicle Controller gearbox

Automatic transmissions are different than manual with auto-shift. An automatic transmission provides smooth transitions without neutral gap among gears.

Details: Gearbox block

Retarder

Retarder brake based on angular velocity. The retarder brake is commonly used in trucks, buses and heavy vehicles.

VP Vehicle Controller retarder

Details: Retarder block

Advanced / Experimental settings

These are detailed at the VehicleBase reference.