The Corgi Engine's Camera Controller. Handles camera movement, shakes, player follow.
More...
|
virtual void | SetTarget (Transform newTarget) |
| Sets a new target for the camera More...
|
|
virtual void | Shake (Vector3 shakeParameters) |
| Use this method to shake the camera, passing in a Vector3 for intensity, duration and decay More...
|
|
virtual void | LookUp () |
| Moves the camera up More...
|
|
virtual void | LookDown () |
| Moves the camera down More...
|
|
virtual void | ResetLookUpDown () |
| Resets the look direction modifier More...
|
|
virtual void | OnMMEvent (CorgiEngineEvent corgiEngineEvent) |
| When the player respawns, we reinitialize this object. More...
|
|
virtual void | StartFollowing () |
| Makes the camera follow its target More...
|
|
virtual void | StopFollowing () |
| Stops the camera from folliwing its target More...
|
|
virtual void | OnMMEvent (MMCameraEvent cameraEvent) |
| Acts on MMCameraEvents when caught More...
|
|
virtual void | OnCameraShakeEvent (float duration, float amplitude, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ, bool infinite, MMChannelData channelData, bool useUnscaledTime) |
| When a MMCameraShakeEvent is caught, shakes the camera More...
|
|
virtual void | TeleportCameraToTarget () |
| Teleports the camera to its target's position plus the specified offsets More...
|
|
void | OnMMEvent (T eventType) |
|
void | OnMMEvent (T eventType) |
|
The Corgi Engine's Camera Controller. Handles camera movement, shakes, player follow.
◆ AssignTarget()
virtual void MoreMountains.CorgiEngine.CameraController.AssignTarget |
( |
| ) |
|
|
protectedvirtual |
Assigns a target to the camera, usually the first player
◆ FollowPlayer()
virtual void MoreMountains.CorgiEngine.CameraController.FollowPlayer |
( |
| ) |
|
|
protectedvirtual |
Moves the camera around so it follows the player
◆ GetLevelBounds()
virtual void MoreMountains.CorgiEngine.CameraController.GetLevelBounds |
( |
| ) |
|
|
protectedvirtual |
Gets the levelbounds coordinates to lock the camera into the level
◆ Initialization()
virtual void MoreMountains.CorgiEngine.CameraController.Initialization |
( |
| ) |
|
|
protectedvirtual |
◆ LateUpdate()
virtual void MoreMountains.CorgiEngine.CameraController.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
Every frame, we move the camera if needed
◆ LookDown()
virtual void MoreMountains.CorgiEngine.CameraController.LookDown |
( |
| ) |
|
|
virtual |
◆ LookUp()
virtual void MoreMountains.CorgiEngine.CameraController.LookUp |
( |
| ) |
|
|
virtual |
◆ MakeCameraPixelPerfect()
virtual void MoreMountains.CorgiEngine.CameraController.MakeCameraPixelPerfect |
( |
| ) |
|
|
protectedvirtual |
Makes the camera pixel perfect by resizing its orthographic size according to the current screen's size.
◆ OnCameraShakeEvent()
virtual void MoreMountains.CorgiEngine.CameraController.OnCameraShakeEvent |
( |
float |
duration, |
|
|
float |
amplitude, |
|
|
float |
frequency, |
|
|
float |
amplitudeX, |
|
|
float |
amplitudeY, |
|
|
float |
amplitudeZ, |
|
|
bool |
infinite, |
|
|
MMChannelData |
channelData, |
|
|
bool |
useUnscaledTime |
|
) |
| |
|
virtual |
When a MMCameraShakeEvent is caught, shakes the camera
- Parameters
-
◆ OnDisable()
virtual void MoreMountains.CorgiEngine.CameraController.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable, we stop listening to events
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.CameraController.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable, we start listening to events
◆ OnMMEvent() [1/2]
virtual void MoreMountains.CorgiEngine.CameraController.OnMMEvent |
( |
CorgiEngineEvent |
corgiEngineEvent | ) |
|
|
virtual |
When the player respawns, we reinitialize this object.
- Parameters
-
checkpoint | Checkpoint. |
player | Player. |
◆ OnMMEvent() [2/2]
virtual void MoreMountains.CorgiEngine.CameraController.OnMMEvent |
( |
MMCameraEvent |
cameraEvent | ) |
|
|
virtual |
Acts on MMCameraEvents when caught
- Parameters
-
◆ ResetLookUpDown()
virtual void MoreMountains.CorgiEngine.CameraController.ResetLookUpDown |
( |
| ) |
|
|
virtual |
Resets the look direction modifier
◆ SetTarget()
virtual void MoreMountains.CorgiEngine.CameraController.SetTarget |
( |
Transform |
newTarget | ) |
|
|
virtual |
Sets a new target for the camera
- Parameters
-
◆ Shake()
virtual void MoreMountains.CorgiEngine.CameraController.Shake |
( |
Vector3 |
shakeParameters | ) |
|
|
virtual |
Use this method to shake the camera, passing in a Vector3 for intensity, duration and decay
- Parameters
-
shakeParameters | Shake parameters : intensity, duration and decay. |
◆ StartFollowing()
virtual void MoreMountains.CorgiEngine.CameraController.StartFollowing |
( |
| ) |
|
|
virtual |
Makes the camera follow its target
◆ StopFollowing()
virtual void MoreMountains.CorgiEngine.CameraController.StopFollowing |
( |
| ) |
|
|
virtual |
Stops the camera from folliwing its target
◆ TeleportCameraToTarget()
virtual void MoreMountains.CorgiEngine.CameraController.TeleportCameraToTarget |
( |
| ) |
|
|
virtual |
Teleports the camera to its target's position plus the specified offsets
◆ Zoom()
virtual void MoreMountains.CorgiEngine.CameraController.Zoom |
( |
| ) |
|
|
protectedvirtual |
Handles the zoom of the camera based on the main character's speed
◆ _camera
Camera MoreMountains.CorgiEngine.CameraController._camera |
|
protected |
◆ _currentVelocity
Vector3 MoreMountains.CorgiEngine.CameraController._currentVelocity |
|
protected |
◆ _currentZoom
float MoreMountains.CorgiEngine.CameraController._currentZoom |
|
protected |
◆ _lastTargetPosition
Vector3 MoreMountains.CorgiEngine.CameraController._lastTargetPosition |
|
protected |
◆ _levelBounds
Bounds MoreMountains.CorgiEngine.CameraController._levelBounds |
|
protected |
◆ _lookAheadPos
Vector3 MoreMountains.CorgiEngine.CameraController._lookAheadPos |
|
protected |
◆ _lookDirectionModifier
Vector3 MoreMountains.CorgiEngine.CameraController._lookDirectionModifier = new Vector3(0,0,0) |
|
protected |
◆ _offsetZ
float MoreMountains.CorgiEngine.CameraController._offsetZ |
|
protected |
◆ _shakeDecay
float MoreMountains.CorgiEngine.CameraController._shakeDecay |
|
protected |
◆ _shakeDuration
float MoreMountains.CorgiEngine.CameraController._shakeDuration |
|
protected |
◆ _shakeIntensity
float MoreMountains.CorgiEngine.CameraController._shakeIntensity |
|
protected |
◆ _xMax
float MoreMountains.CorgiEngine.CameraController._xMax |
|
protected |
◆ _xMin
float MoreMountains.CorgiEngine.CameraController._xMin |
|
protected |
◆ _yMax
float MoreMountains.CorgiEngine.CameraController._yMax |
|
protected |
◆ _yMin
float MoreMountains.CorgiEngine.CameraController._yMin |
|
protected |
◆ AssignCameraOnSpawn
bool MoreMountains.CorgiEngine.CameraController.AssignCameraOnSpawn = true |
if this is true, the camera will auto assign on spawn and respawn
◆ CameraOffset
Vector3 MoreMountains.CorgiEngine.CameraController.CameraOffset |
◆ CameraSpeed
float MoreMountains.CorgiEngine.CameraController.CameraSpeed = 0.3f |
How fast the camera moves.
◆ EnableEffectsOnMobile
bool MoreMountains.CorgiEngine.CameraController.EnableEffectsOnMobile = false |
If set to false, all Cinematic Effects on the camera will be removed at start on mobile targets.
◆ HorizontalLookDistance
float MoreMountains.CorgiEngine.CameraController.HorizontalLookDistance = 3 |
How far ahead from the Player the camera is supposed to be
◆ InstantRepositionCameraOnRespawn
bool MoreMountains.CorgiEngine.CameraController.InstantRepositionCameraOnRespawn = false |
if this is true, the camera will teleport to the player's location on respawn, otherwise it'll move there at its regular speed
◆ LookAheadTrigger
float MoreMountains.CorgiEngine.CameraController.LookAheadTrigger = 0.1f |
Minimal distance that triggers look ahead.
◆ ManualUpDownLookDistance
float MoreMountains.CorgiEngine.CameraController.ManualUpDownLookDistance = 3 |
How high (or low) from the Player the camera should move when looking up/down.
◆ MaximumZoom
float MoreMountains.CorgiEngine.CameraController.MaximumZoom = 10f |
◆ MinimumZoom
float MoreMountains.CorgiEngine.CameraController.MinimumZoom = 5f |
◆ PixelPerfect
bool MoreMountains.CorgiEngine.CameraController.PixelPerfect = false |
if this is true, the script will resize the camera's orthographic size on start to match the desired size and PPU
◆ ReferencePixelsPerUnit
float MoreMountains.CorgiEngine.CameraController.ReferencePixelsPerUnit = 32 |
the reference PPU value (the one you set on your sprites)
◆ ReferenceVerticalResolution
int MoreMountains.CorgiEngine.CameraController.ReferenceVerticalResolution = 768 |
the vertical resolution for which you've created your visual assets
◆ ResetSpeed
float MoreMountains.CorgiEngine.CameraController.ResetSpeed = 0.5f |
How fast the camera goes back to the Player.
◆ StartFollowingBtn
bool MoreMountains.CorgiEngine.CameraController.StartFollowingBtn |
◆ StopFollowingBtn
bool MoreMountains.CorgiEngine.CameraController.StopFollowingBtn |
◆ Target
Transform MoreMountains.CorgiEngine.CameraController.Target |
the current transform target for this camera
◆ TargetController
CorgiController MoreMountains.CorgiEngine.CameraController.TargetController |
◆ ZoomSpeed
float MoreMountains.CorgiEngine.CameraController.ZoomSpeed = 0.4f |
the speed at which the camera zooms
◆ FollowsPlayer
bool MoreMountains.CorgiEngine.CameraController.FollowsPlayer |
|
getset |
True if the camera should follow the player.
The documentation for this class was generated from the following file: