Expected Visualizations with RVO turned on

Hey there,

I’m working on integrating Local Avoidance into our game now. I’m running into a few problems.

First - the debug visualizations flicker, so I have a very hard time seeing what forces or velocities are pushing on my units. Is this expected or am I doing something real dumb?

Second - When I DO see the visualizations, it’s lines that go off into the far distance, which seems suspect considering the velocities I am dealing in should really never be above a 3 magnitude.

Any thoughts or help on actually integrating this would be greatly appreciated!

Cody

The RVO simulation often runs at a different framerate than the game, so the visualizations might not be drawn every frame. For testing you can increase the desired fps setting on the RVO simulator component.

There are a bunch of lines that are drawn, do you think you could show a screenshot of the ones you are unsure of?

The debug mode for RVO is currently not very user friendly, I have mostly used it while developing the system, it has not been designed from the start as help for new users unfortunately.

Hey there, thanks for the reply.

Unfortunately, I can’t show any screenshots of what I am working on.

However, I fixed the line rendering by having a gizmo drawing scene object call into the RVO’s debug drawing.

I now get the draw on every render tick, which is great.

I’m noticing some strangeness with the RVO though. Specifically, units can walk through other units. This made me realize a few things, please correct me if I’m wrong:

  • RVO Is only for avoidance, and if it fails, there is no mechanism to prevent units from overlapping.
  • I probably have the wrong RVO setup.
  • This only happens when one agent is not moving. Is there a simple way to lock an agent as an obstacle when he is not moving?

Can you give some example data that you’d expect for an agent? Specifically time and obstacle horizon.

Actually I just saw another question on here that gave me some good info to try. I hadn’t changed any RVO code other than to make it single threaded, so I was wondering why it didn’t appear to be working.

RVO agents try really hard not to overlap. They should only do so in very crowded situations.

You can enable the ‘locked’ option on the RVOController which will prevent it from moving, or you can enable ‘lock when not moving’ which will set the locked field whenever the desired velocity is zero. However this does adversely affect the local avoidance quality as the RVO algorithm is not originally built for that to happen.

Check out the included example scenes for RVO, those will help you get started I think.

The horizon settings are in seconds and approximately correspond to how far into the future the agent wants to have a collision free path if it continued with its current velocity. A large value will make it avoid things further away, but it may make it too “scared” in some cases. Normal values are around 0.5 to 2 seconds, but those are very fuzzy limits.