The 3D Handbook
Key term

Navigation meshes (navmesh)

A navmesh is a set of convex polygons that marks where AI characters can walk; how engines generate it from level geometry and collision, which agent settings shape it, and what artists and level designers should build for it.

level-designengineaicollision

A navigation mesh (navmesh) is "a collection of two-dimensional convex polygons" that tells AI characters where they can walk; pathfinding then runs across those polygons instead of across the raw level geometry (Wikipedia: Navigation mesh). The idea is usually credited to Greg Snook's article in Game Programming Gems (2000) (Wikipedia: Navigation mesh).

Players never see the navmesh, but they see what goes wrong when it is wrong: enemies that cannot follow you up a ramp, or that walk into a wall where a prop was added late. That is why level designers and environment artists need to know how it is built.

#How a navmesh is generated

Most engines use Recast, an open-source library that "powers AI navigation features in Unity, Unreal, Godot, O3DE and countless AAA and indie games" (GitHub: Recast Navigation). Recast builds the mesh in four steps (GitHub: Recast Navigation):

  1. It "rasterizes the input triangle meshes into voxels".
  2. Voxels where agents cannot move are filtered out.
  3. The walkable voxels are divided into polygonal regions.
  4. Those regions are re-triangulated into the final navmesh.

The input is your level: floors, walls, props and their collision. The agent settings decide which parts survive the filtering step.

Side section through a level. An orange line marks the navmesh on the floor. It starts one agent radius away from the wall, breaks under a low overhang, continues up a small step, appears as a short separate island on top of a tall ledge, and stops before a steep slope.
The same floor with four agent settings at work. Radius pushes the mesh away from walls and edges, height removes it under low overhangs, step height decides which ledges connect, and slope removes steep ground.Diagram by the handbook author

#Agent radius, height, step height and slope

A navmesh describes only where the centre of an agent can stand. Godot puts it plainly: "A navigation mesh only describes a traversable area for an agent's center position" (Godot Engine documentation: Using navigation meshes). Each setting removes part of the walkable surface:

Setting What it does Names in engines
Radius "shrinks the baked navigation mesh to have enough margin for the agent (collision) size" (Godot Engine documentation) Unreal AgentRadius, "Radius of smallest agent to traverse this navmesh" (Unreal Engine documentation); Godot agent_radius
Height "excludes areas from the navigation mesh where the agent is too tall to fit in" (Godot Engine documentation) Unreal AgentHeight; Godot agent_height
Step height removes connections where the height difference between neighbouring voxels is too large (Godot Engine documentation) Unreal AgentMaxStepHeight, now set per resolution in NavMeshResolutionParams (Unreal Engine documentation); Godot agent_max_climb
Slope removes surfaces that are too steep (Godot Engine documentation) Unreal AgentMaxSlope, "The maximum slope (angle) that the agent can move on" (Unreal Engine documentation); Godot agent_max_slope
Cell size the voxel size used in step 1 Godot cell_size and cell_height; Unity defaults to "one third of the Agent radius" (Unity documentation)

The radius rule has a direct consequence for layout. Because the mesh shrinks by one radius from every wall, a gap narrower than twice the agent radius closes completely. A 0.5 m radius, for example, needs a gap of more than 1 m before any navmesh passes through it.

Plan view of two rooms. An orange navmesh fills the floor but stays one radius away from the walls. A crate in the left room cuts a square hole into it. A doorway in the dividing wall stays connected. In the right room, two pillars leave a narrow gap, and the navmesh does not pass through it, leaving a separate island behind.
Seen from above, every wall and prop is grown by the agent radius. Doorways and gaps must be wider than twice the radius to stay connected.Diagram by the handbook author

#Which geometry the navmesh reads

Engines differ in what they feed into step 1:

#What artists and level designers should keep in mind

  • Collision decides walkability. Missing collision leaves holes in the navmesh; a lip or bump in collision can break a connection that looks fine visually. See collision meshes.
  • Small props. Every prop that affects navigation cuts a hole. In Unreal, turn off Can Ever Affect Navigation for actors "that should not affect the Navigation Mesh", such as small or moving actors in unreachable areas (Unreal Engine documentation: Optimizing Navigation Mesh Generation Speed…).
  • Build to the agent metrics. Doorways, corridors, stair steps and ramp angles should fit the agent settings with margin. Agree these numbers in your metrics and test them in a gym level.
  • Several agent sizes. Large enemies need their own navmesh. Sunset Overdrive had one for humanoids (2 m tall, 0.5 m radius) and one for large bots (4.5 m tall, 1.35 m radius) (GameDev.net: A Thread About Navigation Mesh and Sunset…).
  • Off-mesh links cover jumps, ladders and vaults that the mesh cannot represent. At Insomniac, these "nav clues" were placed by artists and designers and built into prefabs for railings and cars (GameDev.net: A Thread About Navigation Mesh and Sunset…).
  • Late changes to set dressing and art passes can break paths that worked in the blockout. Rebuild and check the navmesh after every art pass.

#How to set one up

Unreal Engine 5 (Unreal Engine documentation: Basic Navigation in Unreal Engine; Unreal Engine documentation: ARecastNavMesh; Unreal Engine documentation: Optimizing Navigation Mesh Generation Speed…):

  1. In the Place Actors panel, search for NavMeshBoundsVolume and drag it into the level.
  2. Scale it to cover the walkable area (Epic's example uses X = 20, Y = 20, Z = 5). The navmesh is generated as soon as the volume is added.
  3. Press P to show the navmesh in the viewport (green by default).
  4. Select RecastNavMesh-Default in the Outliner. Set Agent Radius, Agent Height and Agent Max Slope to match your character, and enable Draw Poly Edges and Draw Tile Bounds under Display to check the result.
  5. Keep cell size "as large as possible while maintaining the required precision for your Agents", and tile size "between 32 to 128 cells per side".
  6. Turn off Can Ever Affect Navigation on props that should not cut holes.

Unity (AI Navigation 2.0) (Unity documentation: Create a NavMesh; Unity documentation: NavMesh Surface component reference):

  1. Select the scene geometry and choose Add Component > Navigation > NavMesh Surface.
  2. Pick the Agent Type, and set Collect Objects, Include Layers and Use Geometry (Render Meshes or Physics Colliders).
  3. Click Bake. The result appears as a blue overlay when the Navigation window is open.
  4. Use Minimum Region Area to remove small disconnected islands.

Godot 4 (Godot Engine documentation: Using navigation meshes):

  1. Add a NavigationRegion3D and assign a new NavigationMesh resource.
  2. Set agent_radius, agent_height, agent_max_climb, agent_max_slope, and a cell_size that matches the navigation map.
  3. Choose parsed_geometry_type (meshes, static colliders or both) and bake. Avoid very small cells: they "can create so many voxels that it has the potential to freeze the game or even crash".

#Video tutorials

#Use in recent games

#In different tools

Engine Component Source geometry Visualise
Unreal Engine NavMeshBoundsVolume + RecastNavMesh-Default (Unreal Engine documentation) Collision (simple collision preferred) (Unreal Engine documentation) P key
Unity NavMesh Surface (AI Navigation package) (Unity documentation) Render meshes or physics colliders (Unity documentation) Blue overlay with Navigation window open
Godot 4 NavigationRegion3D + NavigationMesh (Godot Engine documentation) Visual meshes, static colliders or both Engine debug options
Custom engines Recast directly, Detour for queries (GitHub) Whatever the engine feeds it Engine-specific

#Further reading and watching

Related pages: collision meshes, player collision capsule, grids and metrics, gym levels and metrics maps, layout and flow, blockout.

References

  1. Wikipedia contributors · Navigation mesh · Wikipedia · web · accessed 2026-10-22
  2. Recast Navigation contributors · Recast Navigation · GitHub · tool · accessed 2026-10-22
  3. Godot Engine contributors · Using navigation meshes · Godot Engine documentation (source on GitHub) · docs · accessed 2026-10-22
  4. Epic Games · ARecastNavMesh (C++ API) · Unreal Engine documentation · docs · accessed 2026-10-22
  5. Unity Technologies · NavMesh Surface component reference (AI Navigation 2.0) · Unity documentation · docs · accessed 2026-10-22
  6. Epic Games · Optimizing Navigation Mesh Generation Speed in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-22
  7. Jonathan Adamczewski (Insomniac Games) · A Thread About Navigation Mesh and Sunset Overdrive · GameDev.net, 2019 · article · accessed 2026-10-22
  8. Epic Games · Basic Navigation in Unreal Engine · Unreal Engine documentation · docs · accessed 2026-10-22
  9. Unity Technologies · Create a NavMesh (AI Navigation 2.0) · Unity documentation · docs · accessed 2026-10-22
  10. Unity Technologies · New AI Navigation 2.0 video tutorials series · Unity Discussions · forum · accessed 2026-10-22
  11. Marek Zeman (Crytek) · GDC 2024 AI Summit session on CRYENGINE navmeshes, from Crysis 3 to Hunt: Showdown · GDC 2024 session listing, 2024 · talk · accessed 2026-10-22
  12. Tommy Thompson · Behind The AI of Horizon Zero Dawn (Part 2) · Game Developer, 2019 · article · accessed 2026-10-22

Last updated 2026-10-22