Flying NavMeshAgents! | AI Series 10




Published: 13 Apr 2021

In this tutorial I go over how to configure your NavMeshAgent to "fly" around on a NavMesh. This is how you can set up your NavMeshAgents in a Real-Time Strategy style gameI set up, from scratch, a new enemy that flies, has its own attack configuration, can path very differently than the land-based enemies, set up physics layers to prevent melee attacking enemies from being able to hit the flying enemies. I also quickly model a flying enemy in ProBuilder, feel free to skip that section if you already have a flying model.


Flying NavMeshAgents are very similar to other NavMeshAgents, there's just some subtle configuration differences you'll have to look into to make sure your NavMesh is detailed enough, that they can "step" over the obstacles you'd like them to fly up/down. Pay special attention to those sections to make sure you don't miss any important NavMeshSurface configuration or NavMeshAgent configuration!


At the end, I'll go over how to set up Physics Layers to support land-only attacking, air-only attacking, and "Combo" attacking units that can attack both land and air.


🔶 ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out 🙂

👨‍💻 Get the FULL FREE PROJECT on GitHub: https://github.com/llamacademy/ai-series-part-10

🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?section=personal&billing=yearly


Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.


Connect on Social Media

Some links may be affiliate links, which at no additional cost to you, gives LlamAcademy a small portion of the purchase.