Polarith AI
1.8
AIMFollowPath Class Referenceabstract

Description

As the name implies, AIMFollowPath is intended to create complex movement behaviours by following a sequence of points.

This is ideal for creating patrol behaviours or the combination of pathfinding solutions with Polarith AI's local avoidance approach. The Points are provided via PathConnector or by setting them directly.

Usage: Inherit from AIMFollowPath and implement the method GetTarget for specifying how the path should be sampled.

Inheritance diagram for AIMFollowPath:
AIMSteeringBehaviour AIMPerceptBehaviour< SteeringPercept > AIMFollowWaypoints

Public Fields

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 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

abstract Vector3 GetTarget ()
 This method is used to set the current target. More...
 
virtual void OnPathChange ()
 This method is called whenever a path has changed. 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 OnDrawGizmos ()
 Visualizes the position of the current target via Gizmos.DrawSphere(Vector3, float). 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