AI Clumping / Grouping Too Close To Each Other

I’m making a 3rd person hack and slash and I need some help with my AI’s. I’ve built a strafe left and right system for my AI’s, however when a group of enemies start to strafe they bump into each other and try to push each other out of the way. The thing is, all the enemies travel at the same speed so no one is able to push the other out of the way. So it create this problem where the enemies start to clump together. I’ve tried changing the strafe direction when an enemy bump into each other, but they end up bumping into others enemies which just makes them go left and right constantly.

I built my AI’s using a behavior tree and and uses a service to update and change to different states which does different things.

Hey @ArcReed3215!
You might want to take a look at Navigation Query Filters. Here’s a video that might help get you on the right track with what you’re looking for. His example seems pretty similar to what you’re trying to do.

1 Like

Thanks, but this is the first time I’ve ever heard of it so I’m not completely sure how I would integrate it into my AI’s. I still want to keep the strafing around the character and continue to do so even if my character moves, but from the video the query areas are physical placed. The enemies group up when strafing around the character so I’m not sure how I could use the queries to keep them from pushing on each other. Again, this is the first time I’ve heard of query filters so I’ll need to experiment with it before I add it. Thanks again.