Third Person Cover Shooter  1.6
CoverShooter.CoverState Struct Reference

Cover state held by a CharacterMotor. More...

Public Member Functions

float FaceAngle (bool isCrouching)
 Degrees in world space of the direction the character is currently facing. More...
 
bool Take (CoverSearch search, Vector3 observer)
 Takes cover based on the given search. More...
 
void Maintain (CoverSearch search, Vector3 observer)
 Takes cover based on the given search only if it was already adjacent to the previously held cover. More...
 
void Clear ()
 Exits the cover. More...
 
void StandRight ()
 Sets the facing direction to right. More...
 
void StandLeft ()
 Sets the facing direction to left. More...
 
void MoveToLeftAdjacent ()
 Change current cover to the left adjacent cover. More...
 
void MoveToRightAdjacent ()
 Change current cover to the right adjacent cover. More...
 

Public Attributes

const float TallThreshold = 1.1f
 Minimal height of a cover for it to be marked as tall. More...
 
Cover Main
 Cover component of the currently used cover object. More...
 
Cover LeftAdjacent
 Cover adjacent to the main cover. More...
 
Cover RightAdjacent
 Cover adjacent to the main cover. More...
 
Vector3 Observer
 Position of the CharacterMotor. More...
 
int Direction
 Currently held face direction. More...
 

Properties

bool In [get]
 Is the character currently in cover. More...
 
bool IsTall [get]
 Is current cover tall. More...
 
float LeftAdjacentAngle [get]
 Angle between the main cover and the left adjacent cover. More...
 
float RightAngleDiff [get]
 Angle between the main cover and the right adjacent cover. More...
 
bool IsStandingLeft [get]
 Is the character currently facing left of the cover. More...
 
bool IsStandingRight [get]
 Is the character currently facing right of the cover. More...
 
float Width [get]
 Width of the currently held cover object. More...
 
float ForwardAngle [get]
 Degrees in world space of the direction going away from the character towards the cover. More...
 
float MovementAngle [get]
 Degrees in world space of the direction the character would take if walking forward. More...
 
Vector3 ForwardDirection [get]
 Direction from the character towards the cover. More...
 
bool HasLeftAdjacent [get]
 Is there a cover adjacent to the left of the current cover. More...
 
bool HasRightAdjacent [get]
 Is there a cover adjacent to the right of the current cover. More...
 
bool IsLeftAdjacentTall [get]
 Is the left adjacent cover tall. More...
 
bool IsRightAdjacentTall [get]
 Is the right adjacent cover tall. More...
 
bool HasLeftCorner [get]
 Is there a corner on the left of the cover the character can use. More...
 
bool HasRightCorner [get]
 Is there a corner on the right of the cover the character can use. More...
 

Detailed Description

Cover state held by a CharacterMotor.

Member Function Documentation

◆ Clear()

void CoverShooter.CoverState.Clear ( )

Exits the cover.

◆ FaceAngle()

float CoverShooter.CoverState.FaceAngle ( bool  isCrouching)

Degrees in world space of the direction the character is currently facing.

For tall covers it points away from the cover.

◆ Maintain()

void CoverShooter.CoverState.Maintain ( CoverSearch  search,
Vector3  observer 
)

Takes cover based on the given search only if it was already adjacent to the previously held cover.

Parameters
searchCover search.
observerPosition of the character.

◆ MoveToLeftAdjacent()

void CoverShooter.CoverState.MoveToLeftAdjacent ( )

Change current cover to the left adjacent cover.

◆ MoveToRightAdjacent()

void CoverShooter.CoverState.MoveToRightAdjacent ( )

Change current cover to the right adjacent cover.

◆ StandLeft()

void CoverShooter.CoverState.StandLeft ( )

Sets the facing direction to left.

◆ StandRight()

void CoverShooter.CoverState.StandRight ( )

Sets the facing direction to right.

◆ Take()

bool CoverShooter.CoverState.Take ( CoverSearch  search,
Vector3  observer 
)

Takes cover based on the given search.

Parameters
searchCover search.
observerPosition of the character.
Returns
Was the cover taken.

Member Data Documentation

◆ Direction

int CoverShooter.CoverState.Direction

Currently held face direction.

-1 equals left, 1 equals right.

◆ LeftAdjacent

Cover CoverShooter.CoverState.LeftAdjacent

Cover adjacent to the main cover.

Only covers within a certain distance are marked as adjacent.

◆ Main

Cover CoverShooter.CoverState.Main

Cover component of the currently used cover object.

◆ Observer

Vector3 CoverShooter.CoverState.Observer

Position of the CharacterMotor.

◆ RightAdjacent

Cover CoverShooter.CoverState.RightAdjacent

Cover adjacent to the main cover.

Only covers within a certain distance are marked as adjacent.

◆ TallThreshold

const float CoverShooter.CoverState.TallThreshold = 1.1f

Minimal height of a cover for it to be marked as tall.

Property Documentation

◆ ForwardAngle

float CoverShooter.CoverState.ForwardAngle
get

Degrees in world space of the direction going away from the character towards the cover.

◆ ForwardDirection

Vector3 CoverShooter.CoverState.ForwardDirection
get

Direction from the character towards the cover.

◆ HasLeftAdjacent

bool CoverShooter.CoverState.HasLeftAdjacent
get

Is there a cover adjacent to the left of the current cover.

◆ HasLeftCorner

bool CoverShooter.CoverState.HasLeftCorner
get

Is there a corner on the left of the cover the character can use.

◆ HasRightAdjacent

bool CoverShooter.CoverState.HasRightAdjacent
get

Is there a cover adjacent to the right of the current cover.

◆ HasRightCorner

bool CoverShooter.CoverState.HasRightCorner
get

Is there a corner on the right of the cover the character can use.

◆ In

bool CoverShooter.CoverState.In
get

Is the character currently in cover.

◆ IsLeftAdjacentTall

bool CoverShooter.CoverState.IsLeftAdjacentTall
get

Is the left adjacent cover tall.

◆ IsRightAdjacentTall

bool CoverShooter.CoverState.IsRightAdjacentTall
get

Is the right adjacent cover tall.

◆ IsStandingLeft

bool CoverShooter.CoverState.IsStandingLeft
get

Is the character currently facing left of the cover.

◆ IsStandingRight

bool CoverShooter.CoverState.IsStandingRight
get

Is the character currently facing right of the cover.

◆ IsTall

bool CoverShooter.CoverState.IsTall
get

Is current cover tall.

◆ LeftAdjacentAngle

float CoverShooter.CoverState.LeftAdjacentAngle
get

Angle between the main cover and the left adjacent cover.

◆ MovementAngle

float CoverShooter.CoverState.MovementAngle
get

Degrees in world space of the direction the character would take if walking forward.

◆ RightAngleDiff

float CoverShooter.CoverState.RightAngleDiff
get

Angle between the main cover and the right adjacent cover.

◆ Width

float CoverShooter.CoverState.Width
get

Width of the currently held cover object.


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