Runtime Navmesh
The AI Plugin builds navigation meshes from physics geometry at runtime. Sectors are generated when path searches, queries, or prebuild components request an area. Restarting simulation incorporates edits to level geometry.
Input data
Generation uses static collision geometry and its surfaces. A visible render mesh alone is not enough. The navmesh configuration's collision layer filters the geometry collected by the physics module.
Dynamic objects need Navmesh Obstacle for bounds-based carving, or crowd avoidance for local steering around moving characters.
Navigation configuration
In a scene document, open Project > Packages > Ai Project Settings. The dialog contains Ground Types, Navmesh, Path Search, Tactical, and Squads tabs. Configuration is stored in RuntimeConfigs/AiPluginConfig.cfg.
The screenshot shows a project's configuration, not a required preset. Use dimensions that match your level and characters.
Ground types
Ground types identify what a surface means for navigation, such as ordinary ground, mud, or water. Up to 32 types are available. Enable a type with its checkbox; rename editable entries by double-clicking or pressing F2. Disabled entries are hidden from selection elsewhere.
<None> and <Default> always exist. Set a surface's AI ground type to connect collision geometry to these definitions. <None> removes that surface from walkable navmesh input; use it for ground that no agent should traverse. Use a named type when only some agents should avoid it.
Navmesh types
A navmesh type defines physical clearance. Start with one configuration, then add another only when differently sized agents need meaningfully different routes.
| Property | Effect |
|---|---|
Collision Layer | Filters collision geometry used for generation. |
Num Sectors X/Y | Available sector grid, centered around the world origin. |
Sector Size in Meters (XY) | Width of each sector. Smaller sectors limit work per rebuild; larger ones reduce sector count. |
Cell Size (XY) | Horizontal generation resolution. Smaller cells represent narrow details at greater cost. |
Cell Height (Z) | Vertical resolution, affecting steps and clearance. |
Agent Radius | Clearance from walls and narrow passages. Rounded up to a whole number of horizontal cells. |
Agent Height | Required headroom. Rounded up to a whole number of vertical cells. |
Agent Step Height | Maximum climb between walkable spans. Rounded down to a whole number of vertical cells. |
Agent Walkable Slope | Maximum triangle slope considered walkable. |
For example, a radius of 0.3 m with 0.2 m cells becomes two cells, or 0.4 m of effective clearance. Use cell-aligned values to make this predictable. A gap that looks wide enough for the render mesh can still be removed by this clearance requirement.
The remaining settings tune contour simplification, region size/merging, and detail sampling. Adjust these only after checking cell size and agent dimensions with the path test.
Path search types
Path search types define which ground types an agent may traverse and how expensive each one is. They let several character types share the same physical navmesh.
Enable permitted ground types and assign positive traversal costs. A higher cost makes a route less attractive; disabling a ground type forbids it. Cost affects route selection, not the character's movement speed. The navigation component's speed and gameplay logic control actual movement.
Use a path test to compare two configurations through an area with different surface ground types. The path can change even though the underlying navmesh is identical.
Runtime generation and prebuilding
Generation is asynchronous. AI.Navmesh.MaxConcurrentBuilds controls how many sectors can build concurrently (default 4); AI.Navmesh.ShowBuildStats exposes build statistics.
Large or detailed sectors may take longer to become available. Choose sector size based on actual scene density rather than assuming one sector finishes every frame.
Place an AI Nav Mesh Prebuild component around a spawn or combat area to request it in advance. Otherwise, path searches and tactical/EQS queries request the sectors they need. Generating a sector also allows the tactical layer to generate cover there.
Navmesh visualization
Open Panels > CVars, find AI.Navmesh.Visualize, and set it to:
0: show the first configured navmesh.1,2, and so on: show another configured navmesh.-1: disable the visualization.
The current spelling begins with uppercase AI. Visualization does not itself request a build. Simulate with a path test, a navigation request, a query, or a prebuild component to generate the area.
If the overlay is empty, check that a configuration exists, the requested area lies inside its sector grid, and the selected physics layer includes the floor. See Testing and Debugging for a diagnostic sequence.
