Project Settings

This page lists the project settings necessary for the vehicle physics to function properly.

It is important that you do not recompile any scripts at run time as it will throw many errors and immensely slow down the editor. If you do this, you can fix it by exiting play mode and entering it again.

Tags and Layers
The following image shows which tags and layers are necessary for the vehicle physics to operate correctly. The tags do not have to be in any particular order.

Tags
Spikes - Objects which should blow out tires.

Dynamic Object - Small, physical objects which should not cause a vehicle to enter the crashing state.

Roll Camera - Objects which should allow the camera to rotate based on the normal of the surface the vehicle is driving on. If an object does not have this tag, the camera's transform.up direction will be equal to Vector3.up.

Layers
Vehicles - All vehicles should be in this layer.

Camera Collider - The collider attached to the camera, used for object avoidance.

GUI - Used for culling GUI objects from the main camera.

Time
Time.fixedDeltaTime is locked at 0.01 by ControlScript. Changing this will drastically alter the behavior of the physics.

Physics
The max angular velocity may be changed, but lowering it could alter the stability of bikes and monowheels. Default is 20.

The solver iteration count must remain at 7, changing it will drastically alter the vehicle behavior.

In the collision matrix, the camera collider layer should not collide with itself or the water layer.

All other values can be tweaked to your needs.

Script Execution Order
The script execution order must be as follows:

ControlScript

VehicleParent

CarWheelScript

CarWheelColScript

Default Time

All other Scripts can be ordered as you please.