I’m hoping to implement a form of snapping to my navmesh graph based on cursor input. I currently have it “working” by using this code:
closestNode = (Vector3)AstarPath.active.graphs.GetNearest(hitInfo.point).node.position;
While it technically works, they are the centers of triangles instead of an actual grid:
The above orange dots don’t make for very good grid snapping!
I was hoping that instead of getting the nearest node that I could get the nearest vertex.
Or get the nearest quad instead of triangle:
Is there a way to access this graph data so I can get a more reliable grid?