Game Development Reference
In-Depth Information
all tangible obstacles. To calculate this route and to follow it optimally, Unity relies on an internal and
special asset, known as a navigation mesh . The navigation mesh is a special kind of mesh asset that
Unity generates automatically. It's composed like a regular mesh, from vertices, edges, and faces, but
it's not renderable, unlike most other meshes. The purpose of the navigation mesh is to approximate,
in low-poly form, the walkable topology of the scene. Put simply: it represents the scene floor on
which agents can walk. By isolating just the walkable regions of the scene in mesh form, Unity can
quickly and more easily calculate valid routes to destinations and have agents navigate there with as
little error as possible. In this section, we'll generate the navigation mesh for the scene. Chapter 7 will
then make use of this mesh, as we build intelligent enemies.
To access the Navigation Mesh tools, select the main menu option Window Navigation
(see Figure 2-35 ). For convenience, this dialog can be docked as a tab alongside the Object
Inspector, allowing you to see the Scene and Game views alongside the Navigation tools.
Figure 2-35. Accessing the Navigation tools
 
Search WWH ::




Custom Search