Runtime Navigation Modifiers Plugin Documentation

Transform your project's navigation capabilities with the Runtime Navigation Area Modifiers Plugin for Unreal Engine. This tool allows you to create dynamic, flexible navigation zones using complex shapes that surpass Unreal’s native limitations, enhancing your game or simulation’s interactivity and responsiveness.

Example Map

📁
Check out the example map over at Plugins\\RuntimeNavAreaModifiers\\... Press P in-editor to toggle the nav mesh on-screen

Instructions

Enabling runtime changes

  • Select the RecastNavMesh actor in your Outliner and set Runtime Generation to either DynamicModifiersOnly or Dynamic to enable runtime changes
👀
By Default, the Unreal Engine Editor hides plugin content. To see The content inside the plugin, go to the Content Browser's “Settings” and select “Show Plugin Content”. This will let you see any plugin files that are Unreal Engine asset files.

Using a StaticMesh

  • Disable Can ever affect navigation on the StaticMeshComponent (NOT the Actor itself!)
  • Add a RuntimeNavModifierComponent and select it in the details panel
  • Enable StaticMeshComponents on the AllowedComponentTypes enum bitflag
  • Assign a NavArea class
  • Add an Actor and attach one or more StaticMeshComponents, ****or use a StaticMeshActor

Using a Spline

  • Add an Actor and attach one or more SplineComponents
  • Add a RuntimeNavModifierComponent and select it in the details panel
  • Enable StaticMeshComponents on the AllowedComponentTypes enum bitflag
  • Assign a NavArea class
ℹ️
In case you want to follow the spline path with a specific width, check out the native SplineNavModifierComponent instead

Using Instanced Static Meshes

  • Add an Actor and with one or more InstancedStaticMeshComponents
  • Add a RuntimeNavModifierComponent and select it in the details panel
  • Enable InstancedStaticMeshComponents on the AllowedComponentTypes enum bitflag
  • Assign a NavArea class
  • You may need to press Rebuild after moving Instances around

Using PCG spawned Instanced Static Meshes

  • In your PCG Graph, use a Static Mesh Spawner node
  • On the node, fill in “Mesh” as the Out Attribute Name
  • For each Mesh Entry, ensure the StaticMesh has a Simple Collision set up
  • For each Mesh Entry, ensure it does not affect navigation as an obstacle
  • Feed the points coming out of your Static Mesh Spawner node into an Add Nav Modifier Data from Mesh Points node
  • Set up the Area Class on the node

Examples

Using PCG points

  • In your PCG Graph, feed points into an Add Nav Modifier Data from Polygon Points node
  • Set up the Area Class on the node

Components

URuntimeNavModifierComponent

This component is responsible for adding Nav Area Modifiers on the fly based on the geometries specified by any and all URuntimeNavDataComponent attached to the same actor.

Usage

Attach this component to actors to enable runtime navigation modification.

Set the AllowedComponentTypes to specify which components should affect navigation data.

The component will automatically gather data from the relevant components and update the navigation system accordingly.

A URuntimeNavModifierComponent does nothing by itself. You must attach a URuntimeNavDataComponent too!

URuntimeNavDataComponent

This component serves as a container for navigation data that can be dynamically modified.

Usage

Attach this component to an actor and fill the ConvexPolygons and/or SimpleCollisionInstances to your liking, manually or through BPs.

Use the UpdateBoxBounds() method to update the component's bounding box after making any changes to the navigation data, especially at runtime.

Parameters

  • Convex Polygons: Stores an array of convex polygons that are used to define navigable areas.
  • Simple Collision Instances: Maps static meshes to their transformations, which represent simple collision geometries for navigation.
  • Bounding Box Updates: Automatically updates the component’s bounding box based on the contained navigation data.
A URuntimeNavDataComponent does nothing by itself. You must attach a URuntimeNavModifierComponent too!