Create a path from already known GraphNodes

Hi,
excuse me if this has already been covered in the forum or the documentation, I searched but I couldn’t find anything about this apparently.

In the game I’m developing I usually know in advance the exact nodes that represent start & end of the path I want to calculate (because it’s a custom made graph based on PointNodes… I don’t want to digress!). As per title, I’m looking for a way to create a path directly from those two PointNodes, bypassing the internal call of the GetNearest method (which I understand is what is usually done when using Vector3 coordinates).

Ideally, something like:

ABPath.Construct(GraphNode start, GraphNode end, OnPathDelegate callback)

instead of:

ABPath.Construct(Vector3 start, Vector3 end, OnPathDelegate callback)

I tried to “trace” what happens when the path is feeded to AstarPath.StartPath but soon enough the code becomes too obscure for my skills :slight_smile: I’m not a total noob in scripting but I need some advice about how to do that, preferably without the need to modify the original method because I also use the normal methods with Vector3s.

BTW: I’m using version 3.8.8.1 Pro

Thanks!
Paolo

Hi

Currently there is no such method. However if all your nodes have distinct positions then you can just feed in the positions of the nodes and it should be able to find them.