Navigation Tools
These components complement AI Navigation. Use a path test to verify each change before adding behavior logic.
Prebuild an area
AI Nav Mesh Prebuild (plAiNavMeshPrebuildComponent) requests navmesh sectors overlapping a box around its owner before an agent searches there.
HalfExtentsis half the box size. Sector selection uses XY; Z controls the editor gizmo.NavmeshConfigselects one configuration. Leave it empty to request all configured navmeshes.
Place it around a spawn area or combat space where agents need navigation and generated cover immediately. Prebuilding is still asynchronous: the component retries until the sectors exist, then periodically requests the region again. It does not save a baked navmesh asset.
Nav blockers
AI Nav Blocker (plAiNavBlockerComponent) changes path permissions or cost inside a box.
| Property | Use |
|---|---|
BoxSize | Full size of the volume centered on the owner. |
Blocked | Whether the volume is active. Toggle through SetBlocked(bool). |
Mode | Block forbids traversal; Avoid keeps the area traversable at increased cost. |
For a door, place the box across the doorway and toggle Blocked with the door's gameplay state. The underlying floor must remain walkable: turning a blocker off cannot restore polygons removed by the door's static collision geometry. Use collision-layer filtering or a Navmesh Obstacle when geometry itself must change.
Registration splits the overlapping navmesh into suitable polygons by invalidating its sectors. Moving the blocker also requires new splits. Once these polygons exist, toggling the blocker changes their flags or costs without a full rebuild.
Avoid uses AI.Navmesh.AvoidZoneCost, default 10. The avoidance area replaces the original ground type. Use AI.Navmesh.VisualizeBlockers to inspect the volumes: red is blocked, yellow is avoidance, gray is inactive, and orange indicates a dynamic obstacle carve.
Nav links
AI Nav Link (plAiNavLinkComponent) connects two points across a gap, ledge, ladder, or other discontinuity.
- Place the owner at the start point near walkable ground.
- Set
EndOffsetto the endpoint in the owner's local space. - Set
Radiusto the endpoint snap tolerance and choose whether the link isBidirectional. - Set
LinkType:Jump,Vault,Ladder,Drop,Door, orCustom. - Simulate and request a path across it. Enable
AI.Navmesh.VisualizeLinksto inspect registered links.
The component draws its endpoints and connection in edit mode. Links are incorporated into navmesh tiles; placing one does not create walkable ground at its endpoints.
When an agent reaches a link it enters TraversingLink and sends plMsgAiNavLinkTraverse to its owner. The message supplies Start, End, Type, and the link object. Game code can handle it, perform the movement or animation, then call FinishLinkTraversal().
Without a handler, direct-transform navigation supplies a fallback interpolation, with an arc for jump, vault, and drop links. PhysicsCharacter uses controller input toward the endpoint; provide custom traversal for actual jumps or climbs. A link type labels the traversal; it does not automatically select an animation.