Units pushing each other off the grid (grid graph)

Hey there,
I am new to the A* pathfinding project, so be patient with me.

I created a grid graph and it was created just fine. But the problem is that using the AIPath.cs results in units moving over unwalkable areas from time to time. In my game this means that unity fall of an edge and into lava, which is quite unfortunate.

I am using the free version to get started. Maybe local avoidance does fix this problem? But even with a single unit it happens that the unit falls into the lava.

You can imagine the level like U-shape, where the AI has to travel around the corner to get to the player. Then it falls off the edge.

Any help would be appreciated.
Best regards,


Likely that is because the AIPath script cuts corners slightly. So you want to either increase the margin around the edges of the map (for example using the erosionIterations setting on the grid graph) or reduce the amount of corner cutting on the AIPath component (for example by reducing the Pick Next Waypoint Distance and the Forward Look distance).