Add penalty close to blocked areas?

Is there any way to automatically add a penalty close to non-walkable areas? That would be great in our case and force the AI’s to walk on the paths, instead of sticking to the wall even if that happens to be the closest path.

I illustrated what I mean in this image. We also found hexagons to be a better shape for better corner taking.

Is there maybe a way to loop through all nodes, and set the penalty per node for all that has a blocked area next to it, then re-run it again? That would be pretty cool :slight_smile:

Hi

You can use the “Erosion Uses Tags” option: GridGraph - A* Pathfinding Project

This worked exactly like I imagined, excellent! :+1:

Here’s a pic of my tests for reference:

1 Like