Funnel and radius modifier on grid graph causes agent on unwalkable nodes

  • A* version: 5.1.6
  • Unity version: 2022.3.27f1

I use both the funnel and radius modifier on an agent on a LayeredGridGraph.
I have the following situation where the radius modifier causes my agent to move over unwalkable tiles.

The following is the path (blue line) with only the funnel modifier:

This is the same path when I also enable the radius modifier:

I have manually drawn over the part that wasn’t visible well.
The other green path lines are paths to different destinations and as you can see, they go through the doorway better. It’s when we go right around the corner again that things break.

My radius is set to 0.5 for tiles of 1.2.
Is there a way to improve this?

My main objective is to have the simplification of the funnel modifier but to have the unit stick to the center of the node when making turns. The Radius modifier works ok most of the time, but maybe there is an alternative way?

Hi

The radius modifier does not take the world geometry into account. So it can sometimes be tricky to make the path valid at all times. Typically it should work on grid graphs as long as the radius is less than half the node size, though.

Another approach that I would recommend is to use the new FollowerEntity movement script instead. It has a setting for keeping a distance from walls, and that is much more robust than the radius modifier.