Third Person Cover Shooter  1.6
CoverShooter.ThirdPersonController Class Reference

Takes player input (usually from ThirdPersonInput) and translates that to commands to CharacterMotor. More...

Inheritance diagram for CoverShooter.ThirdPersonController:

Public Types

enum  Mode {
  Mode.Default, Mode.Cover, Mode.Sprint, Mode.Aim,
  Mode.Grenade, Mode.Melee
}
 

Public Member Functions

void InputTakeGrenade ()
 
void InputCancelGrenade ()
 
void InputTakeCover ()
 
void InputReload ()
 
void InputJump ()
 
void InputJump (float angle)
 
void InputUnequip ()
 
void InputEquip (WeaponDescription weapon)
 
void InputCrouch ()
 
void InputThrowGrenade ()
 Set the grenade throw mode. More...
 
void InputAim ()
 Make the character aim in the following frame. More...
 
void InputMelee ()
 Tell the controller to manipulate the motor and do a hit. More...
 
void InputRoll (float angle)
 Tell the controller to roll More...
 
void InputClimbOrVault (Cover cover)
 
bool ManualUpdate ()
 

Public Attributes

bool AutoTakeCover = true
 Determines if the character takes cover automatically instead of waiting for player input. More...
 
float CoverEnterDelay = 0.1f
 Time in seconds after a potential cover has been detected when the character automatically enters it. More...
 
bool AlwaysAim = false
 Is the character always aiming in camera direction when not in cover. More...
 
bool AimWhenWalking = false
 Should the character aim when walking, if turned off it will only aim when zooming in. More...
 
bool CrouchNearCovers = true
 Should the character start crouching near closing in to a low cover. More...
 
bool ImmediateTurns = true
 Will the character turn immediatelly when aiming. More...
 
float MeleeRadius = 4
 Radius at which enemy actors are detected in melee mode. More...
 
float MinMeleeDistance = 1.5f
 Distance to maintain against melee targets. More...
 
float AimSustain = 0.4f
 How long to continue aiming after no longer needed. More...
 
float NoAimSustain = 0.14f
 Time in seconds to keep the gun down when starting to move. More...
 
bool CancelHurt = true
 Cancel get hit animations upon player input. More...
 
float ThrowAngleOffset = 30
 Degrees to add when aiming a grenade vertically. More...
 
float MaxThrowAngle = 45
 How high can the player throw the grenade. More...
 
float PostLandAimDelay = 0.4f
 Time in seconds to wait after landing before AlwaysAim activates again. More...
 
float ArmLiftDelay = 1.5f
 Time in seconds to wait before lifting an arm when running with a pistol. More...
 
GameObject ExplosionPreview
 Prefab to instantiate to display grenade explosion preview. More...
 
GameObject PathPreview
 Prefab to instantiate to display grenade path preview. More...
 
Image Scope
 Scope object and component that's enabled and maintained when using scope. More...
 
bool FireInput
 Sets the controller to start or stop firing. More...
 
bool ZoomInput
 Sets the controller to start and stop zooming. More...
 
bool ScopeInput
 Sets the controller to start and stop using scope. More...
 
bool BlockInput
 Sets the controller to block melee attacks. More...
 
Vector3 BodyTargetInput
 Sets the position the controller is rotated at. More...
 
Vector3 AimTargetInput
 Sets the position the controller is aiming at. More...
 
float GrenadeHorizontalAngleInput
 Sets the horizontal angle for aiming a grenade. More...
 
float GrenadeVerticalAngleInput
 Sets the vertical angle for aiming a grenade. More...
 
CharacterMovement MovementInput
 Sets the movement for the controller. More...
 
bool WaitForUpdateCall
 Will the Update function be called manually by some other component (most likely ThirdPersonInput). More...
 

Properties

bool IsZooming [get]
 Is the character using zoom. More...
 
bool IsScoping [get]
 Is the character using zoom. More...
 
bool IsMelee [get]
 Is the controller in melee mode right now. More...
 
bool CouldScope [get]
 Can a scope be displayed right now. More...
 

Detailed Description

Takes player input (usually from ThirdPersonInput) and translates that to commands to CharacterMotor.

Member Enumeration Documentation

◆ Mode

Enumerator
Default 
Cover 
Sprint 
Aim 
Grenade 
Melee 

Member Function Documentation

◆ InputAim()

void CoverShooter.ThirdPersonController.InputAim ( )

Make the character aim in the following frame.

◆ InputCancelGrenade()

void CoverShooter.ThirdPersonController.InputCancelGrenade ( )

◆ InputClimbOrVault()

void CoverShooter.ThirdPersonController.InputClimbOrVault ( Cover  cover)

◆ InputCrouch()

void CoverShooter.ThirdPersonController.InputCrouch ( )

◆ InputEquip()

void CoverShooter.ThirdPersonController.InputEquip ( WeaponDescription  weapon)

◆ InputJump() [1/2]

void CoverShooter.ThirdPersonController.InputJump ( )

◆ InputJump() [2/2]

void CoverShooter.ThirdPersonController.InputJump ( float  angle)

◆ InputMelee()

void CoverShooter.ThirdPersonController.InputMelee ( )

Tell the controller to manipulate the motor and do a hit.

◆ InputReload()

void CoverShooter.ThirdPersonController.InputReload ( )

◆ InputRoll()

void CoverShooter.ThirdPersonController.InputRoll ( float  angle)

Tell the controller to roll

◆ InputTakeCover()

void CoverShooter.ThirdPersonController.InputTakeCover ( )

◆ InputTakeGrenade()

void CoverShooter.ThirdPersonController.InputTakeGrenade ( )

◆ InputThrowGrenade()

void CoverShooter.ThirdPersonController.InputThrowGrenade ( )

Set the grenade throw mode.

◆ InputUnequip()

void CoverShooter.ThirdPersonController.InputUnequip ( )

◆ ManualUpdate()

bool CoverShooter.ThirdPersonController.ManualUpdate ( )

Member Data Documentation

◆ AimSustain

float CoverShooter.ThirdPersonController.AimSustain = 0.4f

How long to continue aiming after no longer needed.

◆ AimTargetInput

Vector3 CoverShooter.ThirdPersonController.AimTargetInput

Sets the position the controller is aiming at.

◆ AimWhenWalking

bool CoverShooter.ThirdPersonController.AimWhenWalking = false

Should the character aim when walking, if turned off it will only aim when zooming in.

◆ AlwaysAim

bool CoverShooter.ThirdPersonController.AlwaysAim = false

Is the character always aiming in camera direction when not in cover.

◆ ArmLiftDelay

float CoverShooter.ThirdPersonController.ArmLiftDelay = 1.5f

Time in seconds to wait before lifting an arm when running with a pistol.

◆ AutoTakeCover

bool CoverShooter.ThirdPersonController.AutoTakeCover = true

Determines if the character takes cover automatically instead of waiting for player input.

◆ BlockInput

bool CoverShooter.ThirdPersonController.BlockInput

Sets the controller to block melee attacks.

◆ BodyTargetInput

Vector3 CoverShooter.ThirdPersonController.BodyTargetInput

Sets the position the controller is rotated at.

◆ CancelHurt

bool CoverShooter.ThirdPersonController.CancelHurt = true

Cancel get hit animations upon player input.

◆ CoverEnterDelay

float CoverShooter.ThirdPersonController.CoverEnterDelay = 0.1f

Time in seconds after a potential cover has been detected when the character automatically enters it.

◆ CrouchNearCovers

bool CoverShooter.ThirdPersonController.CrouchNearCovers = true

Should the character start crouching near closing in to a low cover.

◆ ExplosionPreview

GameObject CoverShooter.ThirdPersonController.ExplosionPreview

Prefab to instantiate to display grenade explosion preview.

◆ FireInput

bool CoverShooter.ThirdPersonController.FireInput

Sets the controller to start or stop firing.

◆ GrenadeHorizontalAngleInput

float CoverShooter.ThirdPersonController.GrenadeHorizontalAngleInput

Sets the horizontal angle for aiming a grenade.

◆ GrenadeVerticalAngleInput

float CoverShooter.ThirdPersonController.GrenadeVerticalAngleInput

Sets the vertical angle for aiming a grenade.

◆ ImmediateTurns

bool CoverShooter.ThirdPersonController.ImmediateTurns = true

Will the character turn immediatelly when aiming.

◆ MaxThrowAngle

float CoverShooter.ThirdPersonController.MaxThrowAngle = 45

How high can the player throw the grenade.

◆ MeleeRadius

float CoverShooter.ThirdPersonController.MeleeRadius = 4

Radius at which enemy actors are detected in melee mode.

◆ MinMeleeDistance

float CoverShooter.ThirdPersonController.MinMeleeDistance = 1.5f

Distance to maintain against melee targets.

◆ MovementInput

CharacterMovement CoverShooter.ThirdPersonController.MovementInput

Sets the movement for the controller.

◆ NoAimSustain

float CoverShooter.ThirdPersonController.NoAimSustain = 0.14f

Time in seconds to keep the gun down when starting to move.

◆ PathPreview

GameObject CoverShooter.ThirdPersonController.PathPreview

Prefab to instantiate to display grenade path preview.

◆ PostLandAimDelay

float CoverShooter.ThirdPersonController.PostLandAimDelay = 0.4f

Time in seconds to wait after landing before AlwaysAim activates again.

◆ Scope

Image CoverShooter.ThirdPersonController.Scope

Scope object and component that's enabled and maintained when using scope.

◆ ScopeInput

bool CoverShooter.ThirdPersonController.ScopeInput

Sets the controller to start and stop using scope.

◆ ThrowAngleOffset

float CoverShooter.ThirdPersonController.ThrowAngleOffset = 30

Degrees to add when aiming a grenade vertically.

◆ WaitForUpdateCall

bool CoverShooter.ThirdPersonController.WaitForUpdateCall

Will the Update function be called manually by some other component (most likely ThirdPersonInput).

◆ ZoomInput

bool CoverShooter.ThirdPersonController.ZoomInput

Sets the controller to start and stop zooming.

Property Documentation

◆ CouldScope

bool CoverShooter.ThirdPersonController.CouldScope
get

Can a scope be displayed right now.

◆ IsMelee

bool CoverShooter.ThirdPersonController.IsMelee
get

Is the controller in melee mode right now.

◆ IsScoping

bool CoverShooter.ThirdPersonController.IsScoping
get

Is the character using zoom.

◆ IsZooming

bool CoverShooter.ThirdPersonController.IsZooming
get

Is the character using zoom.


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