Support Forum

RVO optimisation


Firstly, A*star is great asset and I’m really enjoying it - thanks for your work.

I have been using the RVO Simulator for a RTS-like ‘attack’ command:

  1. The units in formation are ordered to ‘attack’ the yellow square:
  2. The units move to the nearest point on the yellow square collider. As they are not parallel to the square, the nearest position for all units is the same corner.
  3. The area becomes crowded as they all move to the same corner
  4. RVO kicks in as the area is crowded and they all go around:
  5. Continuation of the conga line going around each unit (as they move, their ‘nearest’ position on the collider is updated)
  6. More units turn ‘purple’ when they are at the correct range of the square.

This behaviour is cool – however, the downside is that the units will always work the same way around, even though it would have been quicker for 1 or two units to have gone counter-clockwise.

This behaviour is more undesirable when the target object is smaller, e.g. another unit.

Do you have any suggestions? It might just be a flaw in this approach. Otherwise I will have to fall back on deciding the transform positions in advance.


Here is an example of what it looks like with a unit:

  1. The yellow unit is being attacked. The purple unit is already in position attacking, the other three green units are moving to the nearest spot on the collider.
  2. The green units decide to go counter-clockwise around the unit, whilst it would have been easier to go to the clear spot
  3. Units circle around trying to find a clear spot to attack
  4. The yellow unit has been killed before everyone has had an opportunity to get into place

I think I’ve solved my issue now using predetermined positions.


Sorry for the late answer.
Yes, using a set of predetermined positions that agents can reserve is usually much more robust than relying on local avoidance for this.