Hey all! Happy #TutorialTuesday!
Want to use Root Motion to avoid foot sliding with NavMeshAgents? Here’s how you can do it with step by step instructions for both 1D and 2D blend tree animated models in AI Series Part 42!
Root Motion is a great way to remove that annoying “foot sliding” from mismatched animation vs velocity. But synchronizing that motion with a NavMeshAgent can be tricky! The NavMeshAgent knows where to go and considers local avoidance. So, there’s a lot of things to consider when trying to match these two systems!
In the AI Series (way back at part 3!) I’ve already covered animating NavMeshAgents, but I covered it the other way - where the Animator is driven by the NavMeshAgent’s movement. This works “okay” but there can be noticeable foot sliding and you have to take it a little deeper to get a “good” result by doing things like adjusting playback speed and really tuning the Agent’s velocity.
In today’s video I cover how to have the Animator drive the NavMeshAgent, while still allowing the NavMeshAgent to do some things like high level pathing and local avoidance!
As always, the full project for this video is available on GitHub!