Agents encircle target but don't settle. (see video)

Recorder didn’t capture the cursor, but green highlights are selected units and I’m ordering them to move to a destination of another unit (the one they all gather around). They do an okay job of encircling one layer deep, but outside of that they just keep running around and around. I’d like them to settle and become stationary, like Starcraft or such.

Eager to hear any advice you have on things to try.

They just wanna dance :smiley:

Terrible jokes aside, which movement script are you using, if you’re using any of the built-in ones? Some have support for stopping at crowded destinations (I don’t think they all do, but citation needed).

I’m using FollowerEntity.

So FollowerEntity has support for stopping around a destination, but seemingly only when local avoidance is on. Is that enabled on your agents?

“Automatically stops when trying to reach a crowded destination when using local avoidance.”

Yes, indeed:
image

I have been seeing the same behavior and have come up with a couple of solutions that I have yet to test.

One is to set the destination to float.Infinity once they get close to the target which just stops them. The other is to change the RVO priority once they reached the destination so that they either don’t move (priority 1), or always move out of the way for others (priority 0). Not sure which will behave best for your situation.

How would you know whether they’re “close to the target”? It would be dynamic based on how many other agents are near the destination and if there’s a gap nearby they could fill. Seems that’s something the framework should be solving for, as it’s quite complicated.

So I’m looking at this now, and I’m not noticing this issue myself on FollowEntity at all, with quite a few more units. Interesting enough, with a lower ‘Max Neighbours’ value, I’m getting a bit of jittering but that’s only when I have 45 units and set it to 4. 10 doesn’t give the same issues, so I’m sure your values for local avoidance is fine. So it looks like the local avoidance itself is doing its job, at least in my set up. Here’s what mine looks like (albeit, more spaced out, but with lower radius values its still fine):

Can you show me your FollowerEntity script and I can try to recreate this? I’ll see what happens on my end with your settings and if I can reproduce it I’ll try to find what helps.

I’ve found these settings are finicky. Changing one value slightly can drastically change the overall behavior… and many of them seem interrelated. I’m creating a couple dozen test scenarios to then allow tweaking the properties and finding those which work best in most scenarios.

Yeah it may take some nailing numbers down to get them to move how you’d like. Keep us posted and don’t hesitate to ask for help :saluting_face: