Polarith AI
1.8
DistanceValidator Class Reference

Description

DistanceValidator can be useful in order to recalculate the path if the agent is too far away from it.

Note: You have to set PathPoints and Position before Validate is called. Furthermore, it is assumed that the path points are stored in an ascending order.

Inheritance diagram for DistanceValidator:
Validator

Public Fields

float MaxDistance = 10.0f
 Maximum allowed distance to the nearest edge. More...
 
IList< Vector3 > PathPoints
 The collection storing the path points. More...
 
Vector3 Position
 The current position (of the agent) for calculating the distance. More...
 
int EdgeIndex = -1
 The edge index for beginning the distance check in order to optimize performance. More...
 
bool Enabled = false
 Determines if this Validator instance is enabled. More...
 

Public Methods

override bool Validate ()
 Checks the distance of the Position to the nearest edge. More...
 
Imprint