I am using the paid version of the A* Pathfinding project for a topdown 2D game.
I am using a grid graph.
My agents are using AIPath, a RVO Controller and Seeker.
The agents walk between several destinations, they avoid each other when they cross paths but when they walk from the same starting point to the same destination, they start to overlap and look like they merge and walk on top of each other, instead of walking next to each other with some distance in between.
The same thing happens sometimes when multiple agents arrive at a destination, where they overlap and disappear into each other.
How can I make the agents keep a distance from each other?
I’m sure there’s a simple solution but I can’t get to it, haha.
While making the screenshots I realized that the agents never avoid each other, so it isn’t working at all and what I said in my original post wasn’t completely correct. If two agents need to go to the same destination, or if their paths cross each other in any kind of way, the agents start to overlap.
I’m not sure what’s wrong. Your settings look correct. Though your agent time horizon is really really high. I’d recommend lowering that to maybe 0.5-2 seconds.
Haha, I hoped that trying out higher values would have an effect, that’s why. I lowered it again but it does not really seem to have influence.
I do not move the agents manually. They get spawned in the scene at a random location and I have only tried moving them with the destination setter.
I don’t know if this could influence the local avoidance, but my agents have all pathfinding components in one gameobject, and in the children of that gameobject is all other logic (animation/sprite library/collider).