The closest I have come to something functional is using the desired velocity passed to the rvoAgent. Unfortunately, it avoidance doesn’t seem to be working using this method. My test scene is setup with two AI players starting opposite to one another, and they have to pass by to the other’s starting positing. When they meet in the middle, they become stuck and the avoidance doesn’t seem to be kicking in.
I’m curious whether anyone has found a way to integrate the two since these posts are over a year old now.
This is a lot easier with the latest beta version. In the beta version, the RVOController no longer handles movement by itself, instead you use some movement script which can query the RVOController for how it should move during that frame in order to avoid other agents. The movement script may deviate from this (for example using root motion) with some reduction in avoidance quality as a result. So I encourage you to try the beta version and see if you can get it working there. Personally I haven’t tried to apply root motion to it yet.
Got around to hooking in my character with root motion and it works very well! No more collisions between agents thanks once again @aron_granberg
On a side note, do you know what causes agent to sometimes take an arcing path to their target? I’ve notice that sometimes they seem to wonder great distances indirectly to their target when their are no obstructions and have a clear path straight to their goal.
If you are using a recast graph, this is unfortunately one of the side effects of navmesh based graphs when using pathfinding on the triangle centers. The path is not always optimal.
See this page for some discussion about it: http://www.arongranberg.com/astar/docs/getstarted2.php#navmeshnotes
I’ve been trying to get this to work properly for a couple of days now, but unfortunately I’m not having much luck. The character’s feet constantly look like they are sliding. Is there any chance you could share what you did to achieve root motion with RVO?
Any updates from other people on getting root motion to work properly with richAI + RVOController? I’m using the 3.8.5 rvo beta version, but I’m having problems getting everything to sync up.
My intent is to calculate current speed (movement and rotation) as calculated through RichAI (somehow) and to pass them as parameters to Mecanim during Update. Then I want to use the delta position/rotation from the animation controller to keep things synced with OnAnimatorMove().
e.g.:
void OnAnimatorMove() {
Vector3 vel = m_AIAnimator.deltaPosition / Time.deltaTime;
// But what do I do here???
}
The CalculateMovementDelta example in the docs doesn’t seem to be tied to root motion itself, and my hacking away at things doesn’t seem to be getting me any closer to a working solution. Suggestions?