Third Person Cover Shooter
1.6
|
Manages the camera object by setting an appropriate position depending on the target object's state. More...
Public Attributes | |
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... | |
EnemyDistanceRange | EnemyDistances = new EnemyDistanceRange(5, 10) |
Min and max enemy distance. More... | |
MobileCameraTargetOffsets | TargetOffsets |
Target offsets for each character direction. More... | |
Public Attributes inherited from CoverShooter.BaseCamera | |
CharacterMotor | Target |
Target character motor. More... | |
Action | TargetChanged |
Executed on every camera target change. More... | |
Protected Member Functions | |
override void | Update () |
Properties | |
Vector3 | Forward [get] |
Forward/up direction for the character. More... | |
Vector3 | Right [get] |
Right direction for the character. More... | |
Additional Inherited Members | |
Public Member Functions inherited from CoverShooter.BaseCamera | |
T | TargetComponent< T > () |
Get cached component of the target object. More... | |
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... | |
Manages the camera object by setting an appropriate position depending on the target object's state.
For camera to work you have to link it to the target object that has a Character Motor attached. Camera shifts a bit depending on the orientation of the character. It also zooms out when enemies are close by in order to display a wider combat area.
|
protectedvirtual |
Reimplemented from CoverShooter.BaseCamera.
Vector3 CoverShooter.MobileCamera.CalmOffset = new Vector3(-3, 9, -3) |
Camera offset from the target character when there are no enemies around.
Vector3 CoverShooter.MobileCamera.DangerOffset = new Vector3(-4, 14, -4) |
Camera offset from the target character when there are enemies around.
EnemyDistanceRange CoverShooter.MobileCamera.EnemyDistances = new EnemyDistanceRange(5, 10) |
Min and max enemy distance.
Enemies outside of the range are not considered when zooming.
float CoverShooter.MobileCamera.FOV = 45 |
Field of view.
float CoverShooter.MobileCamera.OffsetSpeed = 2f |
Speed to move between different offsets.
MobileCameraTargetOffsets CoverShooter.MobileCamera.TargetOffsets |
Target offsets for each character direction.
Targets are relative to the character's position.
float CoverShooter.MobileCamera.ZoomDelay = 0.5f |
Time in seconds to go back to the calm offset after there are no more enemies around.
|
get |
Forward/up direction for the character.
|
get |
Right direction for the character.