Version 1 (modified by edy, 9 years ago) (diff)


Tutorial: How to add vehicles to your own scenes

1. Import Edy's Vehicle Physics into your project

You must perform a selective import, as some of the folders are not necessary. Specifically you must import everything except the folders World and Standard Assets (assuming that you already have the Standard Assets in your project) and their content.

2. Drag the vehicle prefabs into your scene

As easy as it sounds. The vehicle prefabs are located in the folder Vehicles\Prefabs.

3. Play!!

The vehicle already respond to basic user input: Horizontal - Vertical axis for steering and acceleration/brake, and Jump (space) as handbrake.

You can make the vehicle stop responding to user input by disabling the property readUserInput from its CarControl component. You should also set its property brakeInput to 1 so it keeps stopped.

3. Add extras if required

  • Skidmarks & smoke: Add the prefab Skidmarks located at EdyVehiclePhysics\Prefabs to the scene. Click Play and you have skidmarks and smoke.

  • Camera looking at the vehicle: Add any of the camera scripts under the folder EdyVehiclePhysics\CameraScripts to your camera. Drag the vehicle GameObject from the Hierarchy to the script's Target property.