NavMesh Build

Build a walkable navigation mesh from geometry.

What it does

Turns geometry into a walkable navigation mesh: a simplified polygon surface that pathfinding searches over. The geometry is voxelised, the walkable area is shrunk inward by the agent's radius so agents do not clip through walls, then the walkable boundary is segmented and extracted as a mesh.

The result is registered under a NavMesh name, so any Pathfind node can look it up and query routes across it. The original geometry passes through the Geometry Out pin unchanged.

When to use it

ParameterTypeDefault
geometryOneOf([Collection])
mesh_idString"default"
agent_radiusNumber0.600
agent_heightNumber2
max_slopeNumber45
max_climbNumber0.900
resolutionNumber64
bounds_sizeNumber100
opacityNumber1

Gotchas

Agent Radius does more than describe the agent: it erodes the walkable surface inward. Raise it for a wide agent and narrow gaps and doorways stop being walkable.

The navmesh is keyed by NavMesh Name, not by node identity. If two NavMesh Build nodes share a name, the later one to cook overwrites the earlier one's registration. Give each distinct navmesh its own name.

Bounds Size sets the voxelisation box the geometry is fit into. Geometry larger than the bounds is clipped from the navmesh. Raise Bounds Size, and Resolution to keep voxel detail, to match the level's scale.

Worked example

  1. Wire the level geometry into Geometry.

  2. Set NavMesh Name to something to reference later, e.g. main_level.

  3. Set Agent Radius and Agent Height to match the character or vehicle that will walk the mesh.

  4. Adjust Max Slope and Max Climb so stairs and gentle ramps stay walkable while steep terrain is excluded.

  5. Raise Resolution and Bounds Size until the navmesh follows the geometry closely enough, watching Polygon Count and Vertex Count as a sanity check.

  6. Add a Pathfind node with the same NavMesh Name to query routes across the mesh.

See also

Pathfind · Physics World · Rigid Body Sim · Geometry (meshes)