(BUG) Wrong path is generated when start and end are too close


You don’t seem to understand the issue. Regardless of if that is actually the shortest path, the path doesn’t even start at the correct position! The option I selected for the Seeker script is that it should start it the closest point along the clossest line (“Node Connection” for “Start Point Snapping”). Clearly, it doesn’t do that. THAT is the issue.

Plus, if you look at, the video, the wrong path generated clearly isn’t the shortest path. It already was going along the correct path and it was getting closer and closer, and it suddently generated a path that would required some back tracking, therefore making it logically longer then the correct path.


I think I kind of found what is going on. The reason why the path isn’t correct is simply because I placed my point in a very unique way and I guess that when the point graph was tested, the way I put my point didn’t fell in the set of case they tested. So basically, my situation is a really extreme “edge case”, that the system just doesn’t handle well.

I decided to remove one of the point and it fixed the issue, but I still think that this issue should REALLY be looked into. Since I’m working on a prototype, it isn’t that much of an issue for me and it actually helped me reflect on my AI and realise that I better just make it better at handelling jump and more smart. I originally hadded the extra point to prevent him from falling immediatly of the edge, but, now that I think of it, it really wasn’t the smartest solution.

I really hope that this issue will be fix, but, for now, just don’t put the points in such a way and it should be fine.
Thanks for all the help! :slight_smile:



Sorry for the late answer. I have been sick for a while.

Ah, so the reason it does not work in your case is because the pathfinding queries will always, without exception, find the closest node to the start and end points. During post-processing it may modify the start and end point of the path to lie on the connections to the start and end nodes, however when searching it will always find the closest node, not the closest point along a connection to a node.

It is possible I suppose to change this behavior, in the PointGenerator.cs script in the GetNearestInternal method you will have to add distance checks not just to the node’s center, but to the closest points along its connections. I can help you add that if you want.