Cameras system
Cameras System
The HighRoad Engine includes dynamic and complete camera management. Two main categories are included : static and dynamic cameras.
Static cameras
For small racetracks, the best solution is sometimes to use a static camera, such as the one in the TheBean scene. In this case, no particular tweaking is required. Just make sure you disable the dynamic camera settings on your scene’s RaceManager inspector.
Dynamic cameras
The HighRoad Engine comes bundled with two cameras that you can tweak or extend to create your very own camera.
- Common/CameraController.cs : this is the base class all dynamic cameras must extend. It defines the list of target player vehicles and the following parameters:
- IsSinglePlayerCamera indicates whether the camera is compatible with multiple targets. This is used by the 3D camera that can only follow one target at a time.
- UpdateType defines when camera movement is done.
- ThirdPersonCameraController : Camera following a simple target from behind. through the inspector, you can customize its behaviour
- IsometricCameraController : an orthographic camera that can track multiple vehicles. This camera can adapt to a 1 player mode in which it’ll change position to anticipate the player’s direction or a multiplayer mode in which it’ll apply an offset to avoid having a player outside of the screen.
- ParallelCameraController : A camera parallel to the target. The car’s distance is parametrable. A Mouse mode allows for moving the target point by drag and drop in the game scene.