Hi,
I’ve been struggling with getting a NavMeshAgent with root motion enabled while not breaking obstacle avoidance. I’ve read the Unity document of mixing components, etc. but none of them actually solve the problem.
I am able to get the base agent to work with root motion by using the 2 approaches outlined by the documentation: https://docs.unity3d.com/Manual/nav-MixingComponents.html but again, once root motion works with the agent, by pulling the agent to the transform, it will break obstacle avoidance - specifically with other agents.
The key here seems to be that the animation moves the transform, but the agent needs run it’s simulation and push the velocity changes back to the transform/animation. Sadly it appears no one has solved the problem or at least have never documented it.
I’ve tried every variation of the document possible, including setting the navmeshagent’s velocity directly. But this usually results in more bugs and behavior issues. The main goal here is the animation moves, and when the agent needs to adjust, it’s position changes are reflected on the transform.