How to make a perfect avoid ai 2d?

why ai can’t avoid it.


Could you make sure the 3 idle agents, have an RVO controller. I haven’t worked with RVO as much, but I’d try setting the idle their destinations to their current position. If I’m not wrong, and Aron will correct me if I’m wrong. But them not having a destination results in their not being a desired velocity. Which is used by the RVO simulation.

Hope that helps,


Could you try setting their destination to their current position?
Could be done super simple by re enabling the Destination setter, and put their own transform into the target.

yes. Like this?

You might want to remove the

target != null 

since this won’t be executed if there is not target set.

But ye give that a try

It’s just garbage, not a problem. But I have deleted it


So the issue here is that the RVO agents are locked. The RVO algorithm does not really handle locked agents well so it will try to move to the gaps between the agents, but they are still too small.
What you can do is to download the RTS beta (, click ‘Show Older Versions’) which has an updated local avoidance algorithm that better handles locked agents.

1 Like

Thank you very much. I’ll try.

It’s work. Thank you.

1 Like