Couple of issues with grid graphs

First one is I haven’t been able to get any of the funnels to work well, they all get into local minima.

Second is I don’t see a way to define a min clearance around obstacles. Graphs aren’t precise enough to not end up with agents falling off cliffs or docks without this type of logic.

Forgot to mention, the local minima issue is when there is no valid end with AiPath. It’s not smart enough to handle that case correctly with all of the funnel modifiers that work with grid graphs. This is a case where it should just stop, not keep trying. It knows it doesn’t have a valid path, and you haven’t given it any new info, the only logical thing it can do is stop.

Hi

I’m not quite sure what you mean. Do you think you could post a screenshot?

There are 2 ways depending on what you want.
First you can increase the ‘diameter’ setting in the grid graph collision settings:

This will increase the margin around obstacles it detects by checking for colliders. This will however not increase the margin around holes or cliff edges which aren’t technically obstacles as there are no colliders there.

The second way is to use erosion. The graph will first be generated as usual, and then for every erosion iteration all nodes in which it is not possible to move in one of the 4 axis aligned directions will be made unwalkable.

0 erosion iterations (though the diameter setting is quite high, which is why there is a large margin around the boxes):

1 iteration

2 iterations