Couldn't find a node close to the end point - for no apparent reason

Greetings,

I have an issue with my agent printing the error message " Couldn’t find a node close to the end point" (Error messages - A* Pathfinding Project) and I do not understand why and when this happens.

My agent does notproduce this error when completely undisturbed but when there is an opponent with its own Grid Graph in the scene, at any given time, he repeatedly loses the end node and/or stops moving alltogether. The picture below is the moment the error occurs. The agent is currently on his own Graph and the other’s Graph.

There is no obstacle or anything, the properties are all fine (canMove=true, isStopped=false, canSearch=true) except for that the path has been set to null since the end node could not be found.
I checked the search distance (100) which is way farther than the end point should be (<35 away).

Does walking over another Grid Graph make any difference? Does setting .destination to the same value produce any recalculations?

Hope can someone help me here,

Best regards,
Dan

Hi

If you have multiple overlapping graphs, make sure their Seeker → Traversable Graphs mask field is set correctly.

Wow, on point. Thanks Aron!

Setting the agent’s mask from Everything to the single intended graph solved the issue.

Though, if you don’t mind telling me, why was that an issue exactly? It’s obvious that the other graph cannot provide a path to the destination. So why does the agent stop sometimes when there’s a possible path on another graph?

1 Like

If the agent’s graph mask was set to everything, it will always pick the closest graph to start searching from. Since they were overlapping, this would probably be one of the graphs somewhat randomly.
Probably it picked one of the graphs, and that graph did not have a good path to the destination.

That makes sense, thanks again!