A* Pathfinding Project

How to make a perfect avoid ai 2d?


#1

why ai can’t avoid it.


#2

Hey,

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,
Wolf


#3

yes


#4

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.


#5

yes. Like this?


#6

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


#7

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


#8

Hi

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 (https://www.arongranberg.com/astar/download, click ‘Show Older Versions’) which has an updated local avoidance algorithm that better handles locked agents.


#9

Thank you very much. I’ll try.


#10

It’s work. Thank you.