A* Pathfinding Project  4.3.2
The A* Pathfinding Project for Unity 3D
PathNNConstraint Class Reference

A special NNConstraint which can use different logic for the start node and end node in a path. More...

Detailed Description

A special NNConstraint which can use different logic for the start node and end node in a path.

A PathNNConstraint can be assigned to the Path.nnConstraint field, the path will first search for the start node, then it will call SetStart and proceed with searching for the end node (nodes in the case of a MultiTargetPath).
The default PathNNConstraint will constrain the end point to lie inside the same area as the start point.

Public Member Functions

virtual void SetStart (GraphNode node)
 Called after the start node has been found. More...
 
- Public Member Functions inherited from NNConstraint
 NNConstraint ()
 Default constructor. More...
 
virtual bool Suitable (GraphNode node)
 Returns whether or not the node conforms to this NNConstraint's rules. More...
 
virtual bool SuitableGraph (int graphIndex, NavGraph graph)
 Returns whether or not the graph conforms to this NNConstraint's rules. More...
 

Properties

static new PathNNConstraint Default [get]
 
- Properties inherited from NNConstraint
static NNConstraint Default [get]
 The default NNConstraint. More...
 
static NNConstraint None [get]
 Returns a constraint which does not filter the results. More...
 

Additional Inherited Members

- Public Attributes inherited from NNConstraint
int area = -1
 Area ID to constrain to. More...
 
bool constrainArea
 Only treat nodes in the area area as suitable. More...
 
bool constrainDistance = true
 Constrain distance to node. More...
 
bool constrainTags = true
 Sets if tags should be constrained. More...
 
bool constrainWalkability = true
 Constrain the search to only walkable or unwalkable nodes depending on walkable. More...
 
bool distanceXZ
 if available, do an XZ check instead of checking on all axes. More...
 
GraphMask graphMask = -1
 Graphs treated as valid to search on. More...
 
int tags = -1
 Nodes which have any of these tags set are suitable. More...
 
bool walkable = true
 Only search for walkable or unwalkable nodes if constrainWalkability is enabled. More...
 

Member Function Documentation

◆ SetStart()

virtual void SetStart ( GraphNode  node)
virtual

Called after the start node has been found.

This is used to get different search logic for the start and end nodes in a path

Property Documentation

◆ Default

new PathNNConstraint Default
staticget

The documentation for this class was generated from the following file: