Polarith AI
1.7
AIMFollowWaypoints Class Reference

Description

This is a concrete implementation of AIMFollowPath.

It provides a basic mechanism for sampling a path by considering its (way)points. For example, after reaching a point, the TargetIndex is modified accordingly to the set StepSize. That index indicates the point on the path used as the current AIMFollowPath.target.

Inheritance diagram for AIMFollowWaypoints:
AIMFollowPath AIMSteeringBehaviour AIMPerceptBehaviour< SteeringPercept >

Public Fields

float TargetRadius = 1.0f
 Determines how close the agent has to move towards to the current target before it is marked as reached. More...
 
int StepSize = 1
 Determines the step size for iterating through the path points. More...
 
PatrolType Patrol = PatrolType.None
 Determines how a path is traversed after the agent has reached the end respectively the start of the path. More...
 
Follow Follow = new Follow()
 The underlying back-end behaviour class. More...
 
List< string > FilteredEnvironments
 All environments to obtain the percepts for. More...
 
List< GameObject > GameObjects
 Allows to specify custom objects which should be processed by this behaviour. More...
 

Protected Fields

IList< Vector3 > points = new List<Vector3>()
 List of points which have to be sampled and followed. More...
 
AIMPathConnector pathConnector
 Used for providing the path. More...
 
Vector3 target
 The target position used by the agent to move towards. More...
 
bool enableVisualization = true
 Determines if the target is visualized or not. More...
 
Color targetColor = Color.cyan
 Determines the color which is used for visualizing the target. More...
 
VelocityGizmo velocityGizmo = new VelocityGizmo()
 Sets up the visualization of the velocity (editor only). More...
 

Properties

override bool ThreadSafe [get]
 Determines whether the underlying back-end class is thread-safe (read only). More...
 
int TargetIndex [get, set]
 Gets or sets the current index the agent is aiming. More...
 
override SteeringBehaviour SteeringBehaviour [get]
 Polymorphic reference to the underlying back-end class (read only). More...
 
Vector3 Target [get]
 The target position used by the agent to move towards (read only). More...
 
virtual AIMPathConnector PathConnector [get, set]
 Used for getting or setting the path data. More...
 
virtual IList< Vector3 > Points [get, set]
 Determines the path points to be sampled in world coordinates. More...
 
override PerceptBehaviour< SteeringPerceptPerceptBehaviour [get]
 Polymorphic reference to the underlying back-end class (read only). More...
 
override MoveBehaviour Behaviour [get]
 Polymorphic reference to the underlying back-end class (read only). More...
 

Public Methods

override void PrepareEvaluation ()
 When AIMSteeringBehaviour.PrepareEvaluation is called, this method is used in order to transfer the data from Target to AIMPerceptBehaviour<T>.GameObjects. More...
 

Protected Methods

override Vector3 GetTarget ()
 Computes the target position for the agent considering its current position and the path. More...
 
override void OnDrawGizmos ()
 Visualizes the target with a trendy circle around it. More...
 
override void OnPathChange ()
 Is called whenever the path is updated. More...
 
override void OnEnable ()
 If pathConnector is not null, this method sets points and adds the delegate AIMPathConnector.PathChanged to OnPathChange. More...
 
override void OnDisable ()
 If pathConnector is not null, this methods removes OnPathChange from the delegate AIMPathConnector.PathChanged. More...
 
override void OnValidate ()
 This function is called when the script is loaded or a value is changed in the inspector (editor only). More...
 
Imprint