Support Forum

How to make AI not hug walls

I’ve got a game with a procedurally generated “infinite” world, and so I’m using a grid graph that follows the player, using the ProceduralGridMover class. I can’t use erosion, and because of that, my AI is hugging walls really tight, tighter than it’s radius is. This causes it to climb up walls because it’s path is closer to the wall than it’s radius is. I’m only using the free version of the plugin, as I wanted to try it to see if the full version would be worth it.

Is there something I’m missing in the free version? Or is there something in the full version that could solve this issue?

Thanks,
PixelDough

Perhaps you could use a custom TraversalProvider which adds a cost penalty the closer a tile is to a wall. This would be more expensive since you’d have to calculate it every certain interval but I’m pretty sure it could work?