Local Avoidance issue: agent stuck behind agent

Hello there-

I am running into an issue where agents get stuck behind locked agents when they have the same target.

the agents stop and lock when they are in attack range. When 3 units march towards their target, the first 2 get locked and the 3 just tries to power through between them but going nowhere.

Is there a way around this or am I missing something?
I’m using the following components:
Seeker
AIPath
AIDestination Setter
RVO Controller

all help is greatly appreciated.

1 Like

Same issue same components

I’ve been messing with the A* project for a few days and I find setting the priority of RVO controller dynamically will force one of the characters to either move out of the way or the other to move around the other. So either set your stationary targets as high priority to make the other move around or the moving one to higher when moving so the other moves out of the way. I’m still dealing with some issues but I got around that with changing priority.

2 Likes

I have priority dynamic based on character size already. and here’s shat I’ve tried:

  • If pathPending set priority to the max, didn’t work
  • set can move to false, didn’t work
  • set movementSpeed to low value, “worked partially but f’ed up the game as the character still move”
    thanks for trying to help though.

Anyone facing the same issue, use the beta version. when you need to pause agent and want him to still be avoidable, use lock option on RVOController and agents will avoid him just fine.

Have you played around with the PickNextWaypoint distance, it seems to find a point beyond the radius to move around. But I think it can mess up by going through blocked corners.

One approach I haven’t tried, but sorta worked in Unity Navmesh agent, is turn non moving character into a obstacle (via obstacle layer mask) when stationary.

1 Like

Yes I did and the best way in my case “GridGraph” is to make it same width as a single node. the issue in this thread is well known as it’s against the RVO concept but Aron managed to make some kind of solution for this in the beta version.
Changing the Character into obstacle is a viable option, it has a script too included in the asset.
Yes I believe that NavMesh Graph will not have this issue, but in my case I must have specific amount of tiles.