Arbor 3: FSM & BT Graph Editor  3.1.1
AgentController Class Reference

AI for the movement component that wraps the NavMeshAgent. More...

Inheritance diagram for AgentController:

Public Types

enum  MovementType { NotChange, Normalize, DivSpeed, DivValue }
 Type of movement vector More...
 
enum  TurnType { UseX, RadianAngle }
 Type of Turn More...
 

Public Member Functions

void Patrol (Vector3 center, float speed, float radius)
 Wander within specified radius More...
 
void Patrol (float speed, float radius)
 Wander within the specified radius from the start position More...
 
void Follow (float speed, float stoppingDistance, Vector3 targetPosition)
 It approaches the specified position More...
 
void Follow (float speed, float stoppingDistance, Transform target)
 Approach to the position of the specified Transform More...
 
void Escape (float speed, float distance, Vector3 targetPosition)
 Keep away from specified position More...
 
void Escape (float speed, float distance, Transform target)
 Away from the specified Transform More...
 
void LookAt (float angularSpeed, Vector3 targetPosition)
 Rotate in the direction of the specified position. More...
 
void LookAt (float angularSpeed, Transform target)
 Rotates in the direction of the specified Transform. More...
 
void Resume ()
 Resume movement. More...
 
void Stop ()
 Stop. More...
 
bool Warp (Vector3 newPosition)
 Warps agent to the provided position. More...
 

Properties

NavMeshAgent agent [get]
 
Transform agentTransform [get]
 
bool isDone [get]
 Whether the move is complete or not. More...
 
bool isMoving [get]
 

Detailed Description

AI for the movement component that wraps the NavMeshAgent.


Used mainly through built-in Behavior's Agent.

Member Enumeration Documentation

enum MovementType
strong

Type of movement vector

Enumerator
NotChange 

Use the value of NavMeshAgent.velocity as it is.

Normalize 

Use the normalized value of NavMeshAgent.velocity.

DivSpeed 

Use the value obtained by dividing NavMeshAgent.velocity by NavMeshAgent.speed.

DivValue 

Use the value obtained by dividing NavMeshAgent.velocity by MovementDivValue.

enum TurnType
strong

Type of Turn

Enumerator
UseX 

Use the X value of the orientation vector.

RadianAngle 

Calculate the radian angle from the XZ value of the direction vector.

Member Function Documentation

void Escape ( float  speed,
float  distance,
Vector3  targetPosition 
)

Keep away from specified position

Parameters
speedMovement speed
distanceDistance away
targetPositionTarget
void Escape ( float  speed,
float  distance,
Transform  target 
)

Away from the specified Transform

Parameters
speedMovement speed
distanceDistance away
targetTarget
void Follow ( float  speed,
float  stoppingDistance,
Vector3  targetPosition 
)

It approaches the specified position

Parameters
speedMovement speed
stoppingDistanceStopping distance
targetPositionObjective point
void Follow ( float  speed,
float  stoppingDistance,
Transform  target 
)

Approach to the position of the specified Transform

Parameters
speedMovement speed
stoppingDistanceStopping distance
targetObjective point
void LookAt ( float  angularSpeed,
Vector3  targetPosition 
)

Rotate in the direction of the specified position.

Parameters
angularSpeedangular speed
targetPositionTarget
void LookAt ( float  angularSpeed,
Transform  target 
)

Rotates in the direction of the specified Transform.

Parameters
angularSpeedangular speed
targetTarget
void Patrol ( Vector3  center,
float  speed,
float  radius 
)

Wander within specified radius

Parameters
centerCenter
speedMovement speed
radiusRadius from the starting position
void Patrol ( float  speed,
float  radius 
)

Wander within the specified radius from the start position

Parameters
speedMovement speed
radiusRadius from the starting position
void Resume ( )

Resume movement.

void Stop ( )

Stop.

bool Warp ( Vector3  newPosition)

Warps agent to the provided position.

Parameters
newPositionNew position to warp the agent to.
Returns
True if agent is successfully warped, otherwise false.

Property Documentation

NavMeshAgent agent
get
Transform agentTransform
get
bool isDone
get

Whether the move is complete or not.

bool isMoving
get