Changes between Initial Version and Version 1 of CameraControl

2011-09-16 17:54:48 (10 years ago)



  • CameraControl

    v1 v1  
     1{{{ #!Markdown 
     3# CameraControl 
     5Controls the main camera of the scene, providing different views and camera options. 
     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: 
     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. 
     18#### Camera modes 
     20CameraControl provides six different camera modes, which are invoked from [CarInput][] through the public functions _Next_ and _SwitchTo_: 
     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_)   
     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. 
     31## CameraControl parameters 
     33The [CarInput][] script controls most of these parameters according to the user's input. 
     35__Target__: reference to the vehicle that is being followed. __It must contain a [CarCameras][] component.__ 
     37__Target2__: optional reference to a secondary vehicle to be used in the _Vehicle to vehicle_ mode. 
     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. 
     41__defaultCamera__: camera mode to be used at startup. 
     43__showMirrors__: enables the mirrors (if available) in the Driver's view. 
     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. 
     47__enableImageEffects__: determines whether the referenced in the _ImageEffects_ list (below) are enabled or not. 
     49#### ImageEffects 
     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. 
     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. 
     55[CarInput]: wiki:CarInput 
     56[CarCameras]: wiki:CarCameras 
     57[live demo]: