Third Person Cover Shooter  1.6
CoverShooter.AIUtil Class Reference

A number of utility functions related to the AI. More...

Static Public Member Functions

static int FindActorsIncludingDead (Vector3 position, float radius, Actor ignore=null)
 Finds all actors near the given position in a given radius. More...
 
static int FindActors (Vector3 position, float radius, Actor ignore=null)
 Finds all actors near the given position in a given radius. More...
 
static int FindActors (Vector3 position, float radius, bool ignoreDead, Actor ignore=null)
 Finds all actors near the given position in a given radius. More...
 
static Actor FindClosestActorIncludingDead (Vector3 position, float radius, Actor ignore=null)
 Finds a closest actor to the given position in a given radius. More...
 
static Actor FindClosestActor (Vector3 position, float radius, Actor ignore=null)
 Finds a closest actor to the given position in a given radius. More...
 
static Actor FindClosestActor (Vector3 position, float radius, bool ignoreDead, Actor ignore=null)
 Finds a closest actor to the given position in a given radius. More...
 
static bool IsNavigationBlocked (Vector3 origin, Vector3 target)
 Returns true if a ray cannot be traced on a navmesh without hiting anything. More...
 
static bool GetClosestStandablePosition (ref Vector3 position)
 Modifies the position to the closed on a nav mesh. More...
 
static bool IsPositionOnNavMesh (Vector3 position)
 Returns true if the given position is on a nav mesh. More...
 
static void Path (ref NavMeshPath path, Vector3 source, Vector3 target)
 Calculates a path from the source to target. More...
 
static bool IsInSight (Actor actor, Vector3 target, float maxDistance, float fieldOfView, float obstacleObstructionDistance=1)
 Returns true if a given position is in sight. More...
 
static bool IsObstructed (Vector3 origin, Vector3 target)
 Returns true if there is no unobstructed line between the given origin and the target. More...
 
static bool IsGoodAngle (float maxTallAngle, float maxLowAngle, Cover cover, Vector3 a, Vector3 b, bool isTall)
 Returns true if the given position on the cover protects the character from the enemy. More...
 
static bool IsCoverPositionFree (Cover cover, Vector3 position, float threshold, Actor newcomer)
 Returns true if the given position is already taken by a friend that's close enough to communicate. More...
 
static bool IsJustThisCoverPositionFree (Cover cover, Vector3 position, float threshold, Actor newcomer)
 Returns true if the given position is free for taking. More...
 

Static Public Attributes

static Actor [] Actors = new Actor[128]
 Actor array filled by some of the methods. More...
 

Detailed Description

A number of utility functions related to the AI.

Member Function Documentation

◆ FindActors() [1/2]

static int CoverShooter.AIUtil.FindActors ( Vector3  position,
float  radius,
Actor  ignore = null 
)
static

Finds all actors near the given position in a given radius.

Returns number of them and fills the Actors array with the results.

◆ FindActors() [2/2]

static int CoverShooter.AIUtil.FindActors ( Vector3  position,
float  radius,
bool  ignoreDead,
Actor  ignore = null 
)
static

Finds all actors near the given position in a given radius.

Returns number of them and fills the Actors array with the results.

◆ FindActorsIncludingDead()

static int CoverShooter.AIUtil.FindActorsIncludingDead ( Vector3  position,
float  radius,
Actor  ignore = null 
)
static

Finds all actors near the given position in a given radius.

Includes actors that are dead. Returns number of them and fills the Actors array with the results.

◆ FindClosestActor() [1/2]

static Actor CoverShooter.AIUtil.FindClosestActor ( Vector3  position,
float  radius,
Actor  ignore = null 
)
static

Finds a closest actor to the given position in a given radius.

◆ FindClosestActor() [2/2]

static Actor CoverShooter.AIUtil.FindClosestActor ( Vector3  position,
float  radius,
bool  ignoreDead,
Actor  ignore = null 
)
static

Finds a closest actor to the given position in a given radius.

◆ FindClosestActorIncludingDead()

static Actor CoverShooter.AIUtil.FindClosestActorIncludingDead ( Vector3  position,
float  radius,
Actor  ignore = null 
)
static

Finds a closest actor to the given position in a given radius.

Can include dead actors.

◆ GetClosestStandablePosition()

static bool CoverShooter.AIUtil.GetClosestStandablePosition ( ref Vector3  position)
static

Modifies the position to the closed on a nav mesh.

Returns true if any were found.

◆ IsCoverPositionFree()

static bool CoverShooter.AIUtil.IsCoverPositionFree ( Cover  cover,
Vector3  position,
float  threshold,
Actor  newcomer 
)
static

Returns true if the given position is already taken by a friend that's close enough to communicate.

◆ IsGoodAngle()

static bool CoverShooter.AIUtil.IsGoodAngle ( float  maxTallAngle,
float  maxLowAngle,
Cover  cover,
Vector3  a,
Vector3  b,
bool  isTall 
)
static

Returns true if the given position on the cover protects the character from the enemy.

◆ IsInSight()

static bool CoverShooter.AIUtil.IsInSight ( Actor  actor,
Vector3  target,
float  maxDistance,
float  fieldOfView,
float  obstacleObstructionDistance = 1 
)
static

Returns true if a given position is in sight.

◆ IsJustThisCoverPositionFree()

static bool CoverShooter.AIUtil.IsJustThisCoverPositionFree ( Cover  cover,
Vector3  position,
float  threshold,
Actor  newcomer 
)
static

Returns true if the given position is free for taking.

◆ IsNavigationBlocked()

static bool CoverShooter.AIUtil.IsNavigationBlocked ( Vector3  origin,
Vector3  target 
)
static

Returns true if a ray cannot be traced on a navmesh without hiting anything.

◆ IsObstructed()

static bool CoverShooter.AIUtil.IsObstructed ( Vector3  origin,
Vector3  target 
)
static

Returns true if there is no unobstructed line between the given origin and the target.

◆ IsPositionOnNavMesh()

static bool CoverShooter.AIUtil.IsPositionOnNavMesh ( Vector3  position)
static

Returns true if the given position is on a nav mesh.

◆ Path()

static void CoverShooter.AIUtil.Path ( ref NavMeshPath  path,
Vector3  source,
Vector3  target 
)
static

Calculates a path from the source to target.

Member Data Documentation

◆ Actors

Actor [] CoverShooter.AIUtil.Actors = new Actor[128]
static

Actor array filled by some of the methods.


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