Skip to main content
Version: Next (dev)

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.

  • HalfExtents is half the box size. Sector selection uses XY; Z controls the editor gizmo.
  • NavmeshConfig selects 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.

AI Nav Blocker (plAiNavBlockerComponent) changes path permissions or cost inside a box.

PropertyUse
BoxSizeFull size of the volume centered on the owner.
BlockedWhether the volume is active. Toggle through SetBlocked(bool).
ModeBlock 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.

AI Nav Link (plAiNavLinkComponent) connects two points across a gap, ledge, ladder, or other discontinuity.

  1. Place the owner at the start point near walkable ground.
  2. Set EndOffset to the endpoint in the owner's local space.
  3. Set Radius to the endpoint snap tolerance and choose whether the link is Bidirectional.
  4. Set LinkType: Jump, Vault, Ladder, Drop, Door, or Custom.
  5. Simulate and request a path across it. Enable AI.Navmesh.VisualizeLinks to 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.

See also