Third Person Cover Shooter  1.6
CoverShooter.TopDownCamera Class Reference

Strategical top down camera that follows characters and adjusts it's height based on the situation. More...

Inheritance diagram for CoverShooter.TopDownCamera:
CoverShooter.CharacterCamera

Public Member Functions

TargetComponent< T > ()
 
void SetTargetImmediately (CharacterMotor value)
 
override void DeferUpdate (ICharacterController controller)
 Asks the camera to call UpdateAfterCamera on the given controller after the camera does it's update. More...
 
override void UpdateForCharacterMotor ()
 Update performed after the character motor does it's thing. More...
 

Public Attributes

CharacterMotor Target
 Target character motor. More...
 
Vector3 CalmOffset = new Vector3(-3, 9, -3)
 Camera offset from the target character when there are no enemies around. More...
 
Vector3 DangerOffset = new Vector3(-4, 14, -4)
 Camera offset from the target character when there are enemies around. More...
 
float OffsetSpeed = 2f
 Speed to move between different offsets. More...
 
float ZoomDelay = 0.5f
 Time in seconds to go back to the calm offset after there are no more enemies around. More...
 
float FOV = 45
 Field of view. More...
 
float Switch = 0.5f
 Time in seconds it takes for the camera to move between targets. More...
 
EnemyDistanceRange EnemyDistances = new EnemyDistanceRange(5, 10)
 Min and max enemy distance. More...
 
MobileCameraTargetOffsets TargetOffsets
 Target offsets for each character direction. More...
 

Properties

Vector3 Forward [get]
 Forward/up direction for the character. More...
 
Vector3 Right [get]
 Right direction for the character. More...
 

Detailed Description

Strategical top down camera that follows characters and adjusts it's height based on the situation.

Member Function Documentation

◆ DeferUpdate()

override void CoverShooter.TopDownCamera.DeferUpdate ( ICharacterController  controller)
virtual

Asks the camera to call UpdateAfterCamera on the given controller after the camera does it's update.

Implements CoverShooter.CharacterCamera.

◆ SetTargetImmediately()

void CoverShooter.TopDownCamera.SetTargetImmediately ( CharacterMotor  value)

◆ TargetComponent< T >()

T CoverShooter.TopDownCamera.TargetComponent< T > ( )
Type Constraints
T :MonoBehaviour 

◆ UpdateForCharacterMotor()

override void CoverShooter.TopDownCamera.UpdateForCharacterMotor ( )
virtual

Update performed after the character motor does it's thing.

Implements CoverShooter.CharacterCamera.

Member Data Documentation

◆ CalmOffset

Vector3 CoverShooter.TopDownCamera.CalmOffset = new Vector3(-3, 9, -3)

Camera offset from the target character when there are no enemies around.

◆ DangerOffset

Vector3 CoverShooter.TopDownCamera.DangerOffset = new Vector3(-4, 14, -4)

Camera offset from the target character when there are enemies around.

◆ EnemyDistances

EnemyDistanceRange CoverShooter.TopDownCamera.EnemyDistances = new EnemyDistanceRange(5, 10)

Min and max enemy distance.

Enemies outside of the range are not considered when zooming.

◆ FOV

float CoverShooter.TopDownCamera.FOV = 45

Field of view.

◆ OffsetSpeed

float CoverShooter.TopDownCamera.OffsetSpeed = 2f

Speed to move between different offsets.

◆ Switch

float CoverShooter.TopDownCamera.Switch = 0.5f

Time in seconds it takes for the camera to move between targets.

◆ Target

CharacterMotor CoverShooter.TopDownCamera.Target

Target character motor.

◆ TargetOffsets

MobileCameraTargetOffsets CoverShooter.TopDownCamera.TargetOffsets
Initial value:
= new MobileCameraTargetOffsets(new Vector3(1, 0, 1),
new Vector3(-1, 0, -1),
new Vector3(-1, 0, 1),
new Vector3(1, 0, -1))

Target offsets for each character direction.

Targets are relative to the character's position.

◆ ZoomDelay

float CoverShooter.TopDownCamera.ZoomDelay = 0.5f

Time in seconds to go back to the calm offset after there are no more enemies around.

Property Documentation

◆ Forward

Vector3 CoverShooter.TopDownCamera.Forward
get

Forward/up direction for the character.

◆ Right

Vector3 CoverShooter.TopDownCamera.Right
get

Right direction for the character.


The documentation for this class was generated from the following file: