Game Development Reference
In-Depth Information
the viewport, then be sure to enable the Show NavMesh option in the NavMesh Display dialog (also
shown in Figure 2-38 ), which appears in the bottom-right corner of the Scene viewport whenever the
Navigation window is active.
Figure 2-38. Previewing a navigation mesh in the viewport. These are the default Bake settings I'm using for CMOD. They'll be
edited and tweaked further as the chapter progresses
The blue NavMesh on the floor represents the area inside which NavMesh Agents may walk and
move whenever they travel using Pathfinding. NavMesh Agents generally don't walk outside the
boundaries of a NavMesh; and thus the NavMesh marks the limits of where an agent may exist in
the scene at any one time. Like my default NavMesh in Figure 2-38 , your NavMesh may also exhibit
a number of anomalies. These can be corrected by tweaking the Bake settings, as we'll see here.
The following lists these anomalies along with their solutions.
NavMesh is too skinny and is cut apart! The NavMesh generated in Figure 2-38
is highlighted in blue. From this, it's clear the mesh doesn't extend over all the
walkable regions of the scene. For example, there are stretches of space on the
floor between the walls and the NavMesh edges. The NavMesh appears as just
a thin sliver of a mesh, snaking its way along the center of the floor without ever
expanding outward to meet the walls. Furthermore, the mesh is not continuous
but is broken apart inside the doorways, leaving gaps or holes in the mesh that
cannot be bridged. NavMesh agents typically expect a single and continuous
NavMesh inside which they may walk. There are exceptions to this rule, but
these are not considered in this topic.
 
Search WWH ::




Custom Search