Changes between Initial Version and Version 1 of CameraControl


Ignore:
Timestamp:
2011-09-16 17:54:48 (10 years ago)
Author:
edy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CameraControl

    v1 v1  
     1{{{ #!Markdown 
     2 
     3# CameraControl 
     4 
     5Controls the main camera of the scene, providing different views and camera options. 
     6 
     7The main camera is a GameObject at the top level of the scene containing a Camera component. You can configure the camera's parameters as usual. The script expects the following components to be also present: 
     8 
     9>CamSmoothFollow   
     10CamMouseOrbit   
     11CamSmoothLookAt   
     12CamFreeView   
     13CamFixTo   
     14CamSmoothLookAtPointFromPos   
     15 
     16These scripts provide the camera modes. They are controlled from CameraControl. Note that some of them are scripts from the Standard Assets with specific adjustments and modifications. 
     17 
     18#### Camera modes 
     19 
     20CameraControl provides six different camera modes, which are invoked from [CarInput][] through the public functions _Next_ and _SwitchTo_: 
     21 
     22__0 -__ Driver's View (_CamFixTo_)   
     23__1 -__ Follow Vehicle (_CamSmoothFollow_)   
     24__2 -__ Mouse View (_CamMouseOrbit_)   
     25__3 -__ Static Position (_CamSmoothLookAt_)   
     26__4 -__ Free Camera (_CamFreeView_)   
     27__5 -__ Vehicle To Vehicle (_CamSmoothLookAtPointFromPos_)   
     28 
     29In the [live demo][] you can use the keys C or F1-F6 to select the camera mode. Press H for help on further keys that controls the camera's movement and zoom. 
     30 
     31## CameraControl parameters 
     32 
     33The [CarInput][] script controls most of these parameters according to the user's input. 
     34 
     35__Target__: reference to the vehicle that is being followed. __It must contain a [CarCameras][] component.__ 
     36 
     37__Target2__: optional reference to a secondary vehicle to be used in the _Vehicle to vehicle_ mode. 
     38 
     39__MapCamera__: optional reference to a camera showing a mini map. This camera is an orthographic camera with a SmoothFollow script configured to keep the camera pointing down above the vehicle. 
     40 
     41__defaultCamera__: camera mode to be used at startup. 
     42 
     43__showMirrors__: enables the mirrors (if available) in the Driver's view. 
     44 
     45__MirrorLeftTex, MirrorRightTex, MirrorRearText__: optional references to the GUITexture components that show the mirror images. Their containing GameObjects must have their transform configured to locate the textures properly on the screen. 
     46 
     47__enableImageEffects__: determines whether the referenced in the _ImageEffects_ list (below) are enabled or not. 
     48 
     49#### ImageEffects 
     50 
     51You can include the image effects of your choice (Component > Image Effects at Unity) in the main camera's GameObject. Optionally, you can reference these image effects here. This will allow all the effects to be enabled or disabled with the _enableImageEffects_ property, providing a "low quality" mode for the camera. 
     52 
     53The [live demo][] uses two image effects, _ColorCorrectionCurves_ and _ContrastStretchEffect_. The "low quality mode" can be toggled with the key F12, which also disables the shadows. 
     54 
     55[CarInput]: wiki:CarInput 
     56[CarCameras]: wiki:CarCameras 
     57[live demo]: http://www.edy.es/unity/offroader.html 
     58 
     59}}}