RVO Controller makes agents to slide within each other

Hi there,

I’m trying to use RVO Controller together with AIPath to don’t let agents go on top of each other, 2D environment. But the agents don’t try to dodge each other at all, it looks like they just go for collision to then slide on one side. For more understanding, here is a clip:
clip

I’m using a Grid Graph, these are the settings, together with AIPath component settings and RVO Controller.



3

Try making the radius on the AIPath bigger?

It changes nothing, they still walk until they slide close to the destination. On the opposite, if I make the radius smaller, it’s less noticeable, but they still somehow “crash” before reach destination. I would like them to temporally change the path to reach destination

And you have an RVO Simulator in your scene?

Sure, it’s on its own empty GO at the most top parent of the scene.

So I mimicked your setup for myself and was having an issue with RVO not working at all- this was mostly my fault, as I had parented the units to an object with a large scale (just me being messy), which changed their scale. Is the unit’s scale 1?

I believe between unparenting them, changing their radius to about 3, and (oddly enough) disabling and re-enabling RVO Controller on all units, it started working as expected. So I think scale and radius might be part of the issue here? Let me know if you have the same results on your end after playing with those.

If you could send a screenshot with the Gizmo for RVO showing, that would help a lot. In 2D it’s a yellow square like this:

image

Thanks for the time you dedicated to it. Yes, the unity scale is set 1 to everything. Incrementing agent radius makes them is not a proper solution, this is what happens:

I can not find that specific debug gizmo option, if you can point it out for me.

I tried everything you suggested, nothing really changed. But I reached somehow a better situation, but the agents now blocks without even trying reach for the player, like as the following image
image

Why are the one at the bottom not trying to around on the right to reach the player? I tried to increase also max neighbours, without success.

1 Like

What radius were they at when this pic was taken? That looks far too large- I’d go somewhere inbetween. If the RVO radius is too small, they’ll bunch up, as they did originally, you won’t see much effect from it. But if it’s too large, then they will have huge gaps between them as in your screenshot. Somewhere in between is what you want, I believe. Try that and let me know how that goes :slight_smile:

If you mean the square gizmo, I think that was just because I used a standard just 2D square as an object, the yellow circle is what I was referring to :+1:

Looks like it’s because they’re blocked above and on the immediate right of them. Therefore in order to get there by going to the right, they’d have to navigate around that patch at the very edge of the image. At that point, left is faster.

Sorry for late reply, was busy lately.

Yes, I found the appropriate radius for my needs, I somehow reached a doable result.

I see. Isn’t there a way to make them path to the destination regardless of these obstructions? What I mean is to make them stop only when RV Controller’s Max neighbours value is satisfied AND there are actually other agents in proximity around it

Sorry would you be able to help me understand what you’re wanting to accomplish? If you’re wanting them to path through these highlighted blocks below, I don’t think there’s much of a way to have them ignore the walkability of a node. The only way to make them go through there is to have it be walkable (afaik).

image

I don’t know if that’s particularly what you’re asking though. Feel free to describe in more detail your goal here :slight_smile:

Yeah, sorry, I’ll try to be more specific. Take this as example:

As you see, they are all blocked there, even if the path (the green line) is there and correct I’d say. I have no agent close to the character but still no agent went close to it. I suppose it’s happening all the agents are trying that same path and blocking each other. My question then is: is there a way to let them find different approaches? As you can see, there is space all around to find alternative ways to reach the same destination, but this type of recalculation is not happening.

Take a look at the Alternative Path modifier and let me know if that helps with the pathing. I’m sure it’s stated above and I’m just missing it, but what’s making those sections unwalkable, just normal world obstacles?

Yes, those are polygon colliders with custom layer mask which I use in Astar to define obstacles.
Alternative path helped a bit, mostly for little obstacles, but the problem stays with that big obstacle in the previous screen. But I noticed something pretty weird.

Look at this situation, they have path defined to their left but the agents still walk towards the direction of the target, not towards the path direction. How so? Did I mess up some settings or is it intended for them?

Hmm, I’m not following along very well from just the picture- are they traversing through the obstacle, rather than following the green path? If you can get a recording or GIF so I can follow along that would help me understand.