How to improve AI Navigation

Currently I have my AI running using the detour crowd AI Controller. All works fairly well and they do a decent job of avoiding each other. The problem I’m running into is when the AI is attempting to get to the player and one AI is blocking the most optimal route to the player, the other AI behind get stuck. They try to force their way to the player and fight to occupy the same space, which causes them to shake rapidly and eventually, due to their collision, launch themselves off the map. Is there a way to have each AI affect navigation, so if one is blocking a doorway they will choose a new more optimal route? Or perhaps have the AI do line traces to check distances to other AI, and if it reads true alter their path so they avoid each other better? I’m not sure how performance heavy that would be. Any suggestions would be greatly appreciated. I’m not C++ savvy, so any ideas using blueprints/behavior tree would help most.

1 Like

Hey dajohn0!

Try checking your AI’s mesh (or capsule if you’re using ACharacter) and make sure the option bCanEverAffectNavigation is set to true.

Let me know if this helps!