Add this script to an orthographic or perspective camera, and it'll try and follow all Character players registered in the LevelManager, and keep them all in the screen.
More...
Add this script to an orthographic or perspective camera, and it'll try and follow all Character players registered in the LevelManager, and keep them all in the screen.
◆ CameraMovement()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.CameraMovement |
( |
| ) |
|
|
protectedvirtual |
Every fixed update, we determine the new position of the camera and move it
◆ ClampNewPosition()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.ClampNewPosition |
( |
| ) |
|
|
protectedvirtual |
Keeps the camera within the defined bounds
◆ CleanPlayersList()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.CleanPlayersList |
( |
| ) |
|
|
protectedvirtual |
Removes disabled players from the list
◆ ComputeZoom()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.ComputeZoom |
( |
| ) |
|
|
protectedvirtual |
◆ DetectTargets()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.DetectTargets |
( |
| ) |
|
|
protectedvirtual |
Looks for and stores the list of players
◆ FindAveragePosition()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.FindAveragePosition |
( |
| ) |
|
|
protectedvirtual |
Finds the average position.
◆ FindRequiredDistance()
virtual float MoreMountains.CorgiEngine.MultiplayerCameraController.FindRequiredDistance |
( |
| ) |
|
|
protectedvirtual |
Determines the perspective camera's z position
- Returns
- The required distance.
◆ FindRequiredOrthographicSize()
virtual float MoreMountains.CorgiEngine.MultiplayerCameraController.FindRequiredOrthographicSize |
( |
| ) |
|
|
protectedvirtual |
Finds the required size of the orthographic camera's zoom.
- Returns
- The required size.
◆ FixedUpdate()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.FixedUpdate |
( |
| ) |
|
|
protectedvirtual |
At FixedUpdate, we compute the new camera's position
◆ GetLevelBounds()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.GetLevelBounds |
( |
| ) |
|
|
protectedvirtual |
Gets the levelbounds coordinates to lock the camera into the level
◆ Initialization()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.Initialization |
( |
| ) |
|
|
protectedvirtual |
Stores initial position, aspect ratio, field of view, detects targets and level bounds
◆ MoveCamera()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.MoveCamera |
( |
| ) |
|
|
protectedvirtual |
Moves the camera to the newly computed position.
◆ OnDisable()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable, we stop listening to events
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable, we start listening to events
◆ OnMMEvent()
virtual void MoreMountains.CorgiEngine.MultiplayerCameraController.OnMMEvent |
( |
CorgiEngineEvent |
corgiEngineEvent | ) |
|
|
virtual |
When the player respawns, we reinitialize this object.
- Parameters
-
checkpoint | Checkpoint. |
player | Player. |
◆ _aspectRatio
float MoreMountains.CorgiEngine.MultiplayerCameraController._aspectRatio |
|
protected |
◆ _averagePosition
Vector3 MoreMountains.CorgiEngine.MultiplayerCameraController._averagePosition |
|
protected |
◆ _camera
Camera MoreMountains.CorgiEngine.MultiplayerCameraController._camera |
|
protected |
◆ _initialZ
float MoreMountains.CorgiEngine.MultiplayerCameraController._initialZ |
|
protected |
◆ _levelBounds
Bounds MoreMountains.CorgiEngine.MultiplayerCameraController._levelBounds |
|
protected |
◆ _moveVelocity
Vector3 MoreMountains.CorgiEngine.MultiplayerCameraController._moveVelocity |
|
protected |
◆ _newPosition
Vector3 MoreMountains.CorgiEngine.MultiplayerCameraController._newPosition |
|
protected |
◆ _tanFov
float MoreMountains.CorgiEngine.MultiplayerCameraController._tanFov |
|
protected |
◆ _xMax
float MoreMountains.CorgiEngine.MultiplayerCameraController._xMax |
|
protected |
◆ _xMin
float MoreMountains.CorgiEngine.MultiplayerCameraController._xMin |
|
protected |
◆ _yMax
float MoreMountains.CorgiEngine.MultiplayerCameraController._yMax |
|
protected |
◆ _yMin
float MoreMountains.CorgiEngine.MultiplayerCameraController._yMin |
|
protected |
◆ _zoomSpeed
float MoreMountains.CorgiEngine.MultiplayerCameraController._zoomSpeed |
|
protected |
◆ DampTime
float MoreMountains.CorgiEngine.MultiplayerCameraController.DampTime = 0.2f |
Defines how fast does the camera change position. Small value : faster camera.
◆ MaxPosition
Vector3 MoreMountains.CorgiEngine.MultiplayerCameraController.MaxPosition |
the maximum coordinates to which the camera will be constrained
◆ MinPosition
Vector3 MoreMountains.CorgiEngine.MultiplayerCameraController.MinPosition |
the minimum coordinates to which the camera will be constrained
◆ OrthoMinSize
float MoreMountains.CorgiEngine.MultiplayerCameraController.OrthoMinSize = 6.5f |
◆ OrthoScreenEdgeBuffer
float MoreMountains.CorgiEngine.MultiplayerCameraController.OrthoScreenEdgeBuffer = 4f |
Space around the screen added after the most distant car.
◆ Players
List<Transform> MoreMountains.CorgiEngine.MultiplayerCameraController.Players |
|
getset |
The documentation for this class was generated from the following file: