[Need some help] AI movement

So to start I’ll try to explain whats going on, as well I will attach a video link below.

I have some AI characters that are regularly spawning - using a behavior tree they move to a particular point on the map unless they detect an enemy. They then go into a combat mode and move towards their target. Whats happening is that after a while they start to stack up and form a line without trying to go around the first model who is attacking, and simply wait until it dies and then they step into place and do their attack.

What I need help with is how to figure out how to get them to use a smarter movement system so they can encircle the other characters that are in combat rang until they get close to an enemy that is that is not on their team and is in attack range. Their target is refreshed at tick to find the closest enemy to their current position, or it remains the same if the current target is already in attack range (I’m hoping to optimize this process better later when I get to stress testing).

I’m trying to stay strictly in blueprints, however if I can’t achieve what I’m looking for I will add in c++ as required. Any tips, videos I should watch, or advice are welcome. Also if anyone is willing to help me 1 on 1 we can communicate via skype just send me a message.

Thanks in advance!

Is your Navmesh dynamic or simply static?

Using a dynamic navmesh the characters will path around eachother and setting strict tolerances on how far away from an enemy they can be before they are allowed to attack will force them to find an appropriate shortest path.

It would be set the the default setting, so Static I believe. Once I get home from vacation I’ll change that and see what happens. Thanks!

You will want to look into the RVO collision avoidance. They moved that into the AI crowd controller a while ago so you might want to change them over to have that as a parent and then you can set those variables up.

Also you can take a look into EQS which can let you query the environment better to make sure they have line of sight to your enemy so that will force them to move around other team members to get a clear shot.

I changed my NavMesh to dynamic and applied RVO collision avoidance, I also made some changes to the their targeting in their nehaivour tree so make it more effective. Thanks for the tips, I’ll be looking into EQS once I learn a bit more about it and I may or may not make further changes, ir will depend on how things turn out as I add more cha

Here is a link to an updated video: https://www.dropbox.com/s/yw6y7hebxw6uvy2/ExampleProblem2.mp4?dl=0

Looks nice. The attack range on the guys seems a tad off though, the club guys aren’t hitting the spear guys with their attacks.