Instant movement isn't achievable with RVO?


Hey Aron,

I’m trying to achieve instant responsiveness, but I’m not quite sure that it is feasible when the character is moving with rvo. Of course the RVO is using multithreading(that’s where the problem is in my opinion). Right now when the character is changing movement there’s like 1-3 frames when the movement is not in right direction.

Is there any way to make some character’s movement calculated in the same frame when the movement direction changes due to player’s action?



This is not possible with the current setup because all agents need to run their RVO calculations at the same time. However if you set the ‘desired simulation fps’ on the RVOSimulator you should only have a 1 frame delay.
Make sure the ‘double buffering’ is disabled too, otherwise that will add another frame of latency.

To really have a zero frame delay you would have to do something like this:

  1. Make you movement scripts call SetTarget on the RVOController
  2. Modify the RVOSimulator component code a bit and force it to run the simulation here
  3. Then use the calculated movement information on all your movement scripts

RVO multithreading is not an issue in itself however as if the ‘double buffering’ option is disabled everything still runs within a single update call in the RVOSimulator, it only spreads the load over several cores.


Hey Aron,

Thanks for the answer. It helped me a lot, but unfortunately, I’ve got too many characters not to use double buffering. Is there a way to somehow use double buffering just on some characters?




Unfortunately not at this point.
You can try to reduce the ‘agent time horizon’ or ‘max neighbours’ setting on the RVOControllers to improve performance.


Unfortunately not at this point, means that you have any plans on doing something about it in the near future? :wink:
Btw, do you have any roadmap on what are you going to develop/upgrade in the near future(our game’s release day is gonna be in june, so we can wait a bit) ? :wink:


Well, it’s hard to combine the 2 goals you have. You use double buffering because you need the performance, but that performance boost comes precisely because it can spend an entire frame calculating stuff on another thread.

I don’t really have any fixed roadmap, I have done some experiments with more RTS-like movement (there’s a beta on the rts branch available under the ‘Show Older Versions’ heading on the download page), but other than that I don’t really know.