Changes between Initial Version and Version 1 of VehiclePhysicsTutorial


Ignore:
Timestamp:
2011-09-17 13:26:24 (13 years ago)
Author:
edy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VehiclePhysicsTutorial

    v1 v1  
     1{{{ #!Markdown 
     2 
     3# Tutorial: Basic scene 
     4 
     5#### 1. Create a new scene and prepare the scenery 
     6 
     7- File > New Scene 
     8- GameObject > Create Other > Plane 
     9- GameObject > Create Other > Directional light 
     10 
     11Alternatively you can create a terrain or import a pre-created scenery. 
     12 
     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 
     17#### 3. Add the control prefabs to the scene 
     18 
     19They are located at the folder _EdyVehiclePhysics/Prefabs_. Add them to the root of the hierarchy: 
     20 
     21- Main  
     22- MainCamera 
     23- SkidMarks 
     24- MapCamera (_optional_) 
     25 
     26Important: 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. 
     27 
     28Also remove the Main Camera object that was included with the empty scene. 
     29 
     30#### 4. Add vehicles to the scene 
     31 
     32The cars from the [Live Demo][1] are available at the folder _Vehicles / Prefabs_. 
     33 
     34You have a prefab _EmptyCar_ at the folder _EdyVehiclePhysics / Prefabs_. This car is fully functional, so you can just place the proper graphics. 
     35 
     36#### 5. Configure the scripts 
     37 
     38- Add each user-controlable vehicle to the list _Main > CarInput > Cars_. 
     39- _Main > CarInput > MainCamera_ must point to the MainCamera game object. 
     40- _MainCamera > CameraControl > Mirror..._ references must point to the _Mirror..._ game objects located as children of Main. 
     41- _MainCamera > CameraControl > MapCamera_ must point to the MapCamera gameobject (if added at step 3). 
     42 
     43#### 6. PLAY! 
     44 
     45Now everything's ready and working!  
     46 
     47#### 7. Optional elements 
     48 
     49You can add your post-processing image effects to the MainCamera object. If you place a reference to them at _CameraControl > ImageEffects_ then they will be enabled / disabled with F12 (low quality mode). 
     50 
     51Same with the main directional light used to project shadows. Reference it at _Main > CarInput > MainLight_ so the shadows will be disabled in the low quaility mode (F12). 
     52 
     53Payload: you can reference a rigidbody at _CarInput > 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 
     55 
     56[1]: http://www.edy.es/unity/offroader.html 
     57 
     58}}}