Partial paths on NavMesh/RecastGraph not working?

  • A* version: 5.3.8
  • Unity version: 6000.0.33f1

Is there any way to get partial paths? I’ve tried creating a ABPath with the start and destination on each side of a navmesh cut (that splits my navmesh in two separate islands). Not no matter the setting for ABPath.calculatePartial the path is always invalid. Regardless if I call AstarPath.StartPath(p); or use the Seeker component.

The documentation suggests that the path returned should find the node closest to the desired destination, and it might be expensive (as it would search the entire isolated area before giving up).

I kind of the the desired behavior if I set AstarPath.maxNearestNodeDistance high enough, but then the path is always complete instead of partial. And since its a global parameter if affects ALL current searches, which is not really desired.

Im having this very same problem, but on a grid.

Depending on AstarPath.maxNearestNodeDistance value, the resulting path will be either invalid or complete (which is not true anyway), so I cant identify when is actually a partial path towards an unreachable point vs a successfull path.

Based on this thread (/t/path-returns-pathcompletestate-complete-instead-of-pathcompletestate-partial/5218/2), I did this:

bool isComplete = path.path[^1] == AstarPath.active.GetNearest(target).node;

Seems to properly output a partial path.

Still remains unclear why the path state is “completed”.