class in UltimateIsometricToolkit.Scripts.Pathfinding / Inherits from MonoBehaviour
node based 3d Grid graph implementation.
A node is defined as a
Gap. An empty space at a given
(x,z) integer position and a
The entire Gridgraph therefore represents an approximation of the inverse of all IsoTransform volumes combined.
||Flag to show the graph in scene view with red gizmos|
||Movement speed in units per second|
||Objects to be ignored when constructing the graph|
- if the ShowGraph flag is set
truebut the scene view is empty the graph has not been constructed yet
- The graph will automatically be reconstructed on
- Ignorables should contain moving objects,all AstarAgents, tiny objects, etc.
- Moving objects will not invoke reconstructing the graph
Gap ClosestNode(Vector3 position)#
Returns the closes
Gap to a given position in 3d isometric space
List<Gap> NodesInBounds(Vector3 min, Vector3 max)#
Returns all Gaps in the Volume (min,max)
Vector2 NodePosToGridPos(Vector3 nodePos)#
The GridGraph rasterizes the xz plane into 1x1 units. This function returns the Grid position to a position in 3d space (by flooring the x,z values)
Reconstructs the Graph
Depending on the number of IsoTransforms in your scene this function may be very resource intensive and invoking it should be avoided as much as possible.