# VPVehicleControler

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

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.

##### 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:

• Disabled: no steering
• Steerable: regular steering as configured in the Steering settings (below).
• Ratio: this axle steers a fraction of the demanded steering. Useful for multi-axle vehicles with several steering axles.
• Reference: the steering ratio is defined by the relative longitudinal position of the axle to the reference transform configured at the Steering settings (below).

### Steering

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

Details: Steering helper

### Brakes

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

Details: Brakes helper

### Tires

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

Details: Tire friction

### Driveline

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

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.

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.

Details:

### Engine

Set up the engine of the vehicle.

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.

• Lock ratio: a kind of ideal coupling based on locking percent.
• Disc friction: realistic clutch providing a limited torque transfer.
• Torque converter: smooth coupling based on the angular velocity. This device is commonly used with automatic transmissions.

Details: Clutch block

### Gearbox

Transmission type, gear ratios and transmission settings.

• Automatic transmission
• Automatic transmission with manual shifting (M)
• Manual transmission
• Manual transmission with automatic shifting

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.

Details: Retarder block