O'Reilly logo

Unity AI Game Programming - Second Edition by Thet Naing Swe, Clifford Peters, Aung Sithu Kyaw, Ray Barrera

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Navigation mesh

Next, we'll learn how to use Unity's built-in navigation mesh generator that can make pathfinding for AI agents a lot easier. As of Unity 5, NavMesh is available to all the users. Previously a Unity Pro-only feature, NavMesh is now a part of the Personal Edition of Unity. We were briefly exposed to Unity's NavMesh in Chapter 2, Finite State Machines and You, which relied on a NavMesh agent for movement in testing our state machine. Now, we will finally dive in and explore all that this system has to offer. AI pathfinding needs representation of the scene in a particular format. We've seen that using a 2D grid (array) for A* Pathfinding on a 2D map. AI agents need to know where the obstacles are, especially the static obstacles. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required