Getting direction of node in relation to another node

Hi Aron, just a quick question!

I currently have a List graphNodeList of the nodes in the path. Is there an internal way to check the whether graphNodeList[0] is eg: to the right of graphNodeList[1]? Or would I have to use graphNodeList[0].position (in worldspace)?

Hi

You can check (node[0] as GridNodeBase).GetNeighbourAlongDirection(1) == node[1]

See GridNodeBase - A* Pathfinding Project for a full list of directions.

1 Like