User Tools


Cameras

Besides the included camera scripts any camera can be used – including the ones in the standard assets.

Camera

  • Create a new empty GameObject as a child of vehicle root called Cameras (any name can be used). This will be a container for all the vehicle cameras - one camera for each viewpoint.
  • Create a new Camera (right click ⇒ Camera) and place it as a child of Cameras object.
  • Added Camera can be used as a stationary camera or with any camera control script. Following camera scripts are included: CameraFolow, CameraMouseDrag, CameraOnboard.
Example camera hierarchy.

Camera Changer

CameraChanger inspector.

CameraChanger iterates over all the Cameras in the VehicleCameras list and makes sure that only one camera is active at one time.

  • Attach CameraChanger component to the Cameras object. This should be an empty object that is a child of vehicle root.
  • Tick Auto Find Cameras or manually assign cameras to the Vehicle Cameras list. If Auto Find Cameras is enabled it is important that all the cameras are placed as children of the object containing CameraChanger script or otherwise they will not be auto-detected.
  • Cameras can be changed by pressing C (default value). Check Input Setup for more info.
Example CameraChanger setup.
2020/04/08 12:36

Camera Inside Vehicle

CameraInsideVehicle inspector.
  • A simple script that can be attached to any Camera.
  • Signals to the vehicle's SoundManager component that it should use interior equalizer settings.
2020/04/08 12:36

Camera Follow

CameraFollow inspector.
  • A type of VehicleCamera.
  • Attach to any Camera object and assign Target that the camera will follow.
  • No user controls are available, for that check out Camera Mouse Drag.
2020/04/08 12:36

Camera Onboard

CameraOnboard inspector.
  • A type of VehicleCamera.
  • Attach to any Camera object and assign Target that the camera will follow.
  • This camera can be used as a stationary camera (Max Movement Offset = 0) or as a driver camera with head movement (Max Movement Offset > 0).
  • Head movement depends on the forces acting on the vehicle. Camera always moves in opposite direction of acceleration.
2020/04/08 12:36

Camera Mouse Drag

CameraMouseDrag inspector.
  • A type of VehicleCamera.
  • Attach to any Camera and assign Target that the camera will follow. If left empty the CameraMouseDrag will auto-find target VehicleController.
  • Camera can be rotated using LMB, zoomed in-out using MMB and panned using RMB.
2020/04/08 12:36