Corridor problem. Extracting coordinates

Hello everyone! I am having a problem with the corridors.

I need the characters at the end of the path not to stick together (not to be in each other). I am not using local avoidance. There are many reasons. The main reason for this was in the original, I really like it.

The blue dots on the pictures are probably the coordinates of the end of the path? If the path is not reachable, is it possible to extract the coordinates? Then process them and put them back. This must be done before starting the movement. And if possible, then before the start of the movement of all characters.

Now I am using AiPath. AiLepr - this is how people do not climb the hill.

Is it possible to somehow solve the problem differently?


I would recommend checking if the destination is reachable beforehand using PathUtilities.IsPathPossible, and then adjusting the agent’s destination property.

I almost solved this problem. Used the BFS function. On this forum, I found a code example to connect it. But the video shows that the problem remains if it approaches the edge of the grid graph.
Does this function work outside of the grid graph? Or am I doing something wrong?

Using PathUtilities.IsPathPossible is a good way, I tried it. If I can’t find the reason, I’ll do an additional check.