Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.SteeringManager Class Reference
Inheritance diagram for Barotrauma.SteeringManager:
Barotrauma.IndoorsSteeringManager

Public Member Functions

 SteeringManager (ISteerable host)
 
void SteeringSeek (Vector2 targetSimPos, float weight=1)
 
void SteeringWander (float weight=1, bool avoidWanderingOutsideLevel=false)
 
void SteeringAvoid (float deltaTime, float lookAheadDistance, float weight=1)
 
void SteeringManual (float deltaTime, Vector2 velocity)
 
void Reset ()
 
void ResetX ()
 
void ResetY ()
 
virtual void Update (float speed)
 
Parameters
speedUpdate speed for the steering. Should normally match the characters current animation speed.

 

Protected Member Functions

virtual Vector2 DoSteeringSeek (Vector2 target, float weight)
 
virtual Vector2 DoSteeringWander (float weight, bool avoidWanderingOutsideLevel)
 
virtual Vector2 DoSteeringAvoid (float deltaTime, float lookAheadDistance, float weight, Vector2? heading=null)
 

Protected Attributes

ISteerable host
 
Vector2 steering
 

Static Protected Attributes

const float CircleDistance = 2.5f
 
const float CircleRadius = 0.3f
 
const float RayCastInterval = 0.5f
 

Properties

Vector2 AvoidDir [get]
 
Vector2 AvoidRayCastHitPosition [get]
 
Vector2 AvoidLookAheadPos [get]
 
float WanderAngle [get, set]
 

Constructor & Destructor Documentation

◆ SteeringManager()

Barotrauma.SteeringManager.SteeringManager ( ISteerable host)

Member Function Documentation

◆ DoSteeringAvoid()

virtual Vector2 Barotrauma.SteeringManager.DoSteeringAvoid ( float deltaTime,
float lookAheadDistance,
float weight,
Vector2? heading = null )
protectedvirtual

◆ DoSteeringSeek()

virtual Vector2 Barotrauma.SteeringManager.DoSteeringSeek ( Vector2 target,
float weight )
protectedvirtual

◆ DoSteeringWander()

virtual Vector2 Barotrauma.SteeringManager.DoSteeringWander ( float weight,
bool avoidWanderingOutsideLevel )
protectedvirtual

◆ Reset()

void Barotrauma.SteeringManager.Reset ( )

◆ ResetX()

void Barotrauma.SteeringManager.ResetX ( )

◆ ResetY()

void Barotrauma.SteeringManager.ResetY ( )

◆ SteeringAvoid()

void Barotrauma.SteeringManager.SteeringAvoid ( float deltaTime,
float lookAheadDistance,
float weight = 1 )

◆ SteeringManual()

void Barotrauma.SteeringManager.SteeringManual ( float deltaTime,
Vector2 velocity )

◆ SteeringSeek()

void Barotrauma.SteeringManager.SteeringSeek ( Vector2 targetSimPos,
float weight = 1 )

◆ SteeringWander()

void Barotrauma.SteeringManager.SteeringWander ( float weight = 1,
bool avoidWanderingOutsideLevel = false )

◆ Update()

virtual void Barotrauma.SteeringManager.Update ( float speed)
virtual

Parameters
speedUpdate speed for the steering. Should normally match the characters current animation speed.

Reimplemented in Barotrauma.IndoorsSteeringManager.

Member Data Documentation

◆ CircleDistance

const float Barotrauma.SteeringManager.CircleDistance = 2.5f
staticprotected

◆ CircleRadius

const float Barotrauma.SteeringManager.CircleRadius = 0.3f
staticprotected

◆ host

ISteerable Barotrauma.SteeringManager.host
protected

◆ RayCastInterval

const float Barotrauma.SteeringManager.RayCastInterval = 0.5f
staticprotected

◆ steering

Vector2 Barotrauma.SteeringManager.steering
protected

Property Documentation

◆ AvoidDir

Vector2 Barotrauma.SteeringManager.AvoidDir
get

◆ AvoidLookAheadPos

Vector2 Barotrauma.SteeringManager.AvoidLookAheadPos
get

◆ AvoidRayCastHitPosition

Vector2 Barotrauma.SteeringManager.AvoidRayCastHitPosition
get

◆ WanderAngle

float Barotrauma.SteeringManager.WanderAngle
getset

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