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.
๐จโ๐ป As always, all code from this video is available on GitHub: https://github.com/llamacademy/ai-series-part-10 This is the END STATE of this tutorial. If you want to follow along, check out part 9: https://github.com/llamacademy/ai-series-part-9 and you can follow along with the video.
๐ท๏ธSave 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?section=personal&billing=yearly
๐งก Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support:
๐ Patreon: https://www.patreon.com/llamacademy
๐ YouTube Member: https://www.youtube.com/channel/UCnWm6pMD38R1E2vCAByGb6w/join or click the Join button on any video
๐ Take my Unity ShaderGraph Course:
https://www.gamedev.tv/p/unity-shader-graph?affcode=45216_kuvg0bp7
๐ Get yourself some LlamAcademy merch: https://llamacademy.myspreadshop.com/
๐ธ Use my Affiliate Link for Humble Bundles https://humblebundleinc.sjv.io/9g4ak4
๐ธ Publisher Sale! 50% OFF an entire publisher's Assets! Publisher changes weekly! https://assetstore.unity.com/publisher-sale?aid=1101l9QvC (affiliate)
๐ธ Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sale=true&orderBy=1&aid=1101l9QvC (affiliate)
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.