Object Crowding/ Collision Avoidance help

I’ve been making many attempts at non-humanoid AI & pathfinding throughout the years and the main problem that I run into is a good algorithm for Crowding.

The specific method of AI that I’m trying to make is strictly the X and Z axis without any elevation, not using any physics, completely local and updated per frame. I just want a method that runs through each object and updates their position so that none of them are intersecting.

What is Crowding?

To put it simply, look at this Picture.
image
These objects are following a target, but not avoiding eachother.

Now apply a Crowding Avoidance algorithm.
image
Evenly dispersed.

1 Like

You’re right i did not read correctly. I apologize.

Each agents walking direction is the average of the directions away from every overlapping agent. Or at least I think that should work. After a few iterations it should find a solution.