Animate Your NavMeshAgents with Root Motion | AI Series Part 42 | Unity Tutorial #Shorts @LlamAcademy
Animate Your NavMeshAgents with Root Motion | AI Series Part 42 | Unity Tutorial #Shorts  @LlamAcademy
Uploaded September 2022 | Updated September 2026, 2 hours ago
Full Tutorial: youtu.be/uAGjKxH4sDQ

Learn how to combine a Root Motion animated model with a NavMeshAgent! This gives you all the pathing benefits and local avoidance of the Navigation System with the precise animation you expect from Root Motion.

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!

We've already learned how to animate NavMeshAgents where the NavMeshAgent drives the Animator state (way back in AI Series Part 3: youtu.be/wLZPM46zgUo), but in this video we're going to do it the other way - with the Animator driving the NavMeshAgent!

There are multiple ways to approach this solution. In this repository I have chosen what makes the most sense to me - correcting the position of the Root Motion to pathable areas by moving the position of the model back towards the NavMeshAgent when they are out of sync.

As always, all code from this video is available on GitHub: github.com/llamacademy/ai-series-part-42

Gargoyle Model used here: assetstore.unity.com/packages/3d/characters/creatures/gargoyles-fantasy-rpg-37416?aid=1101l9QvC

๐Ÿ“š Resources ๐Ÿ“š
โšซ Root Motion: docs.unity3d.com/Manual/RootMotion.html
โšซ Synchronizing NavMeshAgents and Root Motion: docs.unity3d.com/Manual/nav-CouplingAnimationAndNavigation.html
โšซ NavMeshAgents and Other Systems: docs.unity3d.com/Manual/nav-MixingComponents.html

As usual with the AI Series, we're using the NavMesh Components: docs.unity3d.com/Manual/NavMesh-BuildingComponents.html not the built-in navigation system.

๐Ÿ“ฑ Let's stay connected
YouTube: youtube.com/c/LlamAcademy
Patreon: patreon.com/llamacademy
Facebook: facebook.com/LlamAcademyOfficial
Twitter: twitter.com/TheLlamAcademy
TikTok: tiktok.com/@LlamAcademy
Instagram: instagram.com/LlamAcademy

----

Believe in LlamAcademy's mission and have received value from the videos? Consider becoming a Patreon supporter: patreon.com/llamacademy

----
Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets: assetstore.unity.com/publishers/22409?_aid=1101l9QvC
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.

#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment #ai
Animate Your NavMeshAgents with Root Motion | AI Series Part 42 | Unity Tutorial #ShortsNamespaces in C# by Unity Example | Beginner Unity TutorialOpaque Objects Making It Hard to See? Fade Them Out with the Standard URP Shaders #shortsEvery Physics Overlap Visualized | Unity TutorialJust another day using VSCode to build Unity games...Inheritance and Interfaces for Beginners | Unity C# Basics 6 | Unity TutorialProcedural Mesh & Animation with the Official Unity Spline Package | Unity TutorialRoot Motion NavMeshAgent Animation | AI Series Part 42 | Unity TutorialAnimated 3D Models on the UI with URP | Unity TutorialFade Objects with C# and the Standard URP Shaders | Unity TutorialHow Use Git with Unity! Itโ€™s FREE, Easy, and Saves Your Bacon!Procedural Recoil and Bullet Spread | Gun Series 2 | Unity Tutorial #Shorts
LlamAcademy |

Animate Your NavMeshAgents with Root Motion | AI Series Part 42 | Unity Tutorial #Shorts

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER