Randomation Vehicle Physics Wiki
Register
Advertisement

Welcome to the Randomation Vehicle Physics Wiki

This wiki documents the Randomation Vehicle Physics package for Unity.  This package comes with the expectation that you already have a basic understanding of Unity and at least some experience programming, assuming you want to modify the scripts.  All scripts are written in UnityScript (JavaScript).  The Unity version used to build the package is 4.3.2 free.  If you do not understand something on this wiki, want more info, or find a bug, just e-mail me at justincouch@randomationmedia.com.

A printable PDF version of this wiki is available here.

Updates

1.5 - Dive Factor variable added to VehicleParent to make vehicles dive forward while airborne.  Most of the GetComponent calls in the scripts have been cached to improve performance.

1.4 - No Menu and No Hud variables added to ControlScript, which allow you to disable the demo menu and HUD.  Auto Look variable added to CameraScript to make the camera rotate to look towards the direction the vehicle is traveling while in the hood (bonnet) view.  You can now create two-wheeled vehicles which don't behave as bikes; in order to create a bike, the wheels must be in line with each other.

1.3.1 - Kickstand variable added to VehicleParent; when set to true, bikes and monowheels will tilt slightly to the left as if they are being held up by a kickstand.  When the Avoid Roll Over variable in the VehicleParent script is set to false, bikes and monowheels will now fall over rather than always try to stand up.  Fixed overlooked input functions in WheelEnhance, where they contained specific input axis strings rather than references to the dynamic ones in ControlScript.  Wheel gizmos now move along with the wheel mesh in play mode making for easier adjusting.

1.2 - SetDoppler function added to VehicleParent to set the doppler level for all audio sources on a vehicle.  A bug with returning the friction of terrain colliders in Unity 4.3 has been fixed.

1.1 - The variable invertDotPitch of VehicleParent has been removed and replaced with engineDirection and bilateralEngineSound.  The variables spawnPoint, spawnRotation, useMetricUnits, setBoostPower, resetButton, respawnButton, and restartButton have been added to ControlScript.  Editor gizmos have been added to VehicleParent and CarWheelColScript.

Core Pages

Setting Up a Vehicle - How to set up a new vehicle.

Project Settings - Ideal settings for your Unity project.

VehicleParent - The main vehicle script.

CarWheelScript - The visual wheel script.

CarWheelColScript - The wheel collider script.

CameraScript - The main camera script.

ControlScript - The global control script.

HUDScript - The script for controlling the HUD.

WaterScript - The script for handling water collisions.

Tire Mark - The tire mark prefab.

Other Pages

Function Script - A script meant to store extra static functions.

Advertisement