StartMultiTargetPath return Path Failed when there is obvious path

In the screenshot below, the yellow line is the multitarget path the right most unit trying to move to. However, it gives me Path Failed : Computation Time 0.00 ms Searched Nodes 0 If I manually intervene, like slightly moving the this unit or update a navmesh cut caused by other units, it usually can find a right path again. Any insight on why this is happening?

Path Failed : Computation Time 0.00 ms Searched Nodes 0
Error: Couldn't find a valid node close to the any of the end points
Path Number 45 (unique id)
UnityEngine.Debug:LogWarning (object)
AstarPath:LogPathResults (Pathfinding.Path) (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:849)
AstarPath:<.ctor>b__82_3 (Pathfinding.Path) (at ./Packages/com.arongranberg.astar/Core/AstarPath.cs:665)
Pathfinding.PathProcessor:CalculatePathsThreaded (Pathfinding.PathHandler,Pathfinding.BlockableChannel`1/Receiver<Pathfinding.Path>) (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathProcessor.cs:357)
Pathfinding.PathProcessor/<>c__DisplayClass27_0:<StartThreads>b__0 () (at ./Packages/com.arongranberg.astar/Core/Pathfinding/PathProcessor.cs:121)
System.Threading.ThreadHelper:ThreadStart ()

Seeker and AI configuration

AStar configuration

Astar 5.1.1
Unity2022.3.28f1

Hi

I note that you have set A* Inspector → Settings → Max Nearest Node Distance to 0.15.
This means that the path will fail if the end points are more than 15cm from a reachable part of the navmesh (even on the Y axis). Maybe this is what is happening?

The navmesh cut in the picture has a 1.6 radius. The ends of those yellow lines are definitely within 0.15 to a walkable area. I tried make it 0.5 instead of 0.15 and it seems a bit better, but not fixing it completely. Making the Max Nearest Node Distance a lot bigger (like 10), will cause it to generate a wrong path when there is a thin wall (e.g. a 2 width wall caused by multiple units’ navmesh cut) between the unit and the target. Is there anything else I can try?

Hi

Are you sure it is close enough on the Y axis as well? The y axis also matters for the distance calculation.

The Y axis is always 0 in my game. The ground is completely flat, the collider generating it is a simple plane/box.

I noticed that even when I move a stucking unit by 0.1 (manually moving the unit while running in editor), it would generate a valid path afterward. Otherwise, the stuck unit usually need a navmesh cut update (some other unit moved/died) to “find” the path.

Weird.
Would you mind changing the A* Inspector → Settings → Debug → Graph Coloring setting to “Areas”. All the nodes around your agents should show up in the same color if they are connected. If some nodes unexpectedly show up in a different color, something might be happening with the navmesh cutting.

I changed the Max Nearest Node Distance back to 0.15 so that the issue triggers more often. (I was using 0.35 since last time you mentioned it).

The navmesh is always the same color at the moment. I captured some screenshot when some units failed to find a path. Again, yellow lines are the multitarget path destinations.
See the screenshot below:


image

Hi, any updates to this?