RVO without RVOController

Hi.

I’m trying to link the RVO code to our already exiting character controller/locomotion/pathfinding system.

I wish to avoid using the RVOController as a lot of the functionality in it is already implemented elsewhere.

Can you explain the work flow of reading/writing to the RVOAgent object, and which fields should be updated every frame and so on.

I was trying to deconstruct the RVOController but i can’t understand the logic that is being performed.

Hi

You can take a look at the LightweightRVO.cs example script, that uses RVO without RVOControllers.

Basically you want to set these parameters on start:
Radius MaxSpeed AgentTimeHorizon ObstacleTimeHorizon MaxNeighbours NeighbourDist
(the same ones that are exposed in the RVOController inspector).

And every frame (or as often as you like) you set the DesiredVelocity property.
Read the position from the InterpolatedPosition property, if you need the velocity, you can read it from the Velocity property. You can also set the Velocity property, but that effectively bypasses local avoidance so I don’t recommend it.

I was planning to do this also, using Unitys build in navmesh and navAgents (for reasons), but adding Astars RVO avoidance, would this be possible?

I had some looks on the LightweightRVO, but I cant really figure out what is happening in there. Any help would be appreciated.

I’m not sure… I think it would be tricky as Unity’s navmesh agents also use local avoidance.

I assumed that you could turn of local aviodance on Unity Agents, maybe I was wrong.

I’m not sure, so you might be correct.