Changes between Version 3 and Version 4 of VehiclePhysicsTutorial
- Timestamp:
- 2013-01-21 12:39:23 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
VehiclePhysicsTutorial
v3 v4 5 5 #### 1. Create a new scene and prepare the scenery 6 6 7 -File > New Scene8 -GameObject > Create Other > Plane9 -GameObject > Create Other > Directional light7 * File > New Scene 8 * GameObject > Create Other > Plane 9 * GameObject > Create Other > Directional light 10 10 11 11 Alternatively you can create a terrain or import a pre-created scenery. 12 12 13 -Terrain > Create Terrain14 -Play a while with the terrain tools (height, texture...)15 -Leave flat areas for the roads, or you could use the _Road and Path Tool_ (available at the Asset Store) for creating the roads.13 * Terrain > Create Terrain 14 * Play a while with the terrain tools (height, texture...) 15 * Leave flat areas for the roads, or you could use the _Road and Path Tool_ (available at the Asset Store) for creating the roads. 16 16 17 17 #### 3. Add the control prefabs to the scene … … 19 19 They are located at the folder _EdyVehiclePhysics/Prefabs_. Add them to the root of the hierarchy: 20 20 21 - Main 22 -MainCamera23 -SkidMarks24 -MapCamera (_optional_)21 * Main 22 * MainCamera 23 * SkidMarks 24 * MapCamera (_optional_) 25 25 26 Important: The position and rotation of the _Main_ must be (0,0,0). Scale must be (1,1,1). Otherwise the mirrors won't be displayed correctly.26 Important: The position and rotation of _Main_ and _SkidMarks_ must be (0,0,0). Scale must be (1,1,1). Otherwise the mirrors and the skidmarks won't be displayed correctly. 27 27 28 28 Also remove the Main Camera object that was included with the empty scene. … … 36 36 #### 5. Configure the scripts 37 37 38 -Add each user-controlable vehicle to the list _Main > CarMain script > Cars_.39 -_Main > CarMain script > MainCamera_ must point to the MainCamera game object.40 -_MainCamera > CameraControl script > Mirror..._ references must point to the _Mirror..._ game objects located as children of Main.41 -_MainCamera > CameraControl script > MapCamera_ must point to the MapCamera gameobject (if added at step 3).38 * Add each user-controlable vehicle to the list _Main > CarMain script > Cars_. 39 * _Main > CarMain script > MainCamera_ must point to the MainCamera game object. 40 * _MainCamera > CameraControl script > Mirror..._ references must point to the _Mirror..._ game objects located as children of Main. 41 * _MainCamera > CameraControl script > MapCamera_ must point to the MapCamera gameobject (if added at step 3). 42 42 43 43 #### 6. PLAY! 44 44 45 Now everything's ready and working! 45 Now everything's ready and working! 46 46 47 47 #### 7. Optional elements … … 51 51 Same with the main directional light used to project shadows. Reference it at _Main > CarMain script > MainLight_ so the shadows will be disabled in the low quaility mode (F12). 52 52 53 Payload: you can reference a rigidbody at _CarMain script > Payload_ and it will be "lifted" when pressing E. This is an element just for fun in the [Live Demo][1], a kind of heavy box that is originally loaded at the red pickup. 54 53 Payload: you can reference a rigidbody at _CarMain script > Payload_ and it will be "lifted" when pressing E. This is an element just for fun in the [Live Demo][1], a kind of heavy box that is originally loaded at the red pickup. 55 54 56 55 [1]: http://www.edy.es/dev/vehicle-physics/live-demo