Many ways to define obstacles, how to make the right choice


I am doing some research on handling dynamic obstacles, after reading through a few topics, i can see there are multiple ways to do it. Navmesh Cut, Local Avoidance, Penalties. I’m not sure which one fits best our intentions.

Let say I have some NPC that walk the navmesh randomly, as of now (a idling NPC) when I want to go behind the NPC, my AI goes straight into it and gets stucked instead of making the small detour. I am using a custom baked NavMesh. When you mention NavMesh Cut, it seems like it only work for Recast Graphs, am I wrong?
Would Local Avoidance be the best choice here?

In the end the NPC will walk (not constantly though). Do I have to take that into consideration as well when deciding which way I will handle this obstacle?

I can not test as I use the free version, but I want to make sure I’m asking myself the right questions before going deeper.



Local avoidance would undoubtedly be the best choice here since it is agent-agent avoidance and not agent-static obstacle avoidance.

You could add penalties below all characters to discourage other characters to calculate paths through them, but since they would be moving most of the time, I don’t think it would work very well since the paths are planned long before the characters actually reach those points, and then it would only make odd detours trying to avoid a character which isn’t there anymore.

NavmeshCut does currently only work for recast graphs. I am working on merging the recast and navmesh graphs because so that navmesh cutting can be used with recast graphs, but currently it is not possible.