Skip to main content

PathFinder

class PathFinder

PathFinder generates a path to a target taking into account the nearest path.


public class PathFinder extends Component

— Constructors (1) —

ConstructorDescription
PathFinder()Creates a new instance of PathFinder.

— Enumerators (1) —

public enum LookTo{
Disabled, Path, Target
}

— Methods (18) —

NameDescription
Vector3 findNearestPoint()Returns the closest point of the PathFinder.
Vector3 getNearestPoint()Returns the closest point of the PathFinder.
int findNearestPointIndex()Returns the index of the point closest of the PathFinder.
int getNearestPointIndex()Returns the index of the point closest of the PathFinder.
Vector3 getFindNearestPoint()Returns the closest point of the PathFinder.
int getFindNearestPointIndex()Returns the index of the point closest of the PathFinder.
SpatialObject getTarget()Returns the current Pathfinder target.
void setTarget(SpatialObject object)Sets the current PathFinder target.
[LookTo] getLookTo()Returns the current PathFinder look type ("Disabled", "Path", or "Target").
void setLookTo([LookTo] lookToo)Sets the current PathFinder look type ("Disabled", "Path", or "Target").
float getSearchDelay()Returns the current search delay.
void setSearchDelay(float value)Sets the current search delay.
float getTargetDistance()Returns the current distance from the PathFinder to the target.
float getTargetDistanceInPath()Returns the current distance from the PathFinder to the target on the path.
void forceSearch()Force search of the PathFinder path to the target.
List\<Vector3> getPath()Returns the current path of the PathFinder.
boolean hasPath()Returns true if the Pathfinder has a path, returns false if not.
boolean hasTarget()Returns true if PathFinder has a target, returns false if not.