Open World Navigation in Unreal Engine 4

In this guide we will enable open world navigation in Unreal Engine 4 using the Navigation Invoker system.

One annoyance that most developers forget to think about when creating open world or procedural levels is the navigation system taking hours to generate the nav mesh.

Using navigation invokers, we can generate the nav mesh during runtime without a long wait in the editor.

Before we Start

To enable these features, dynamic pathfinding must be enabled to allow the navigation mesh to generate during runtime.

To learn how to enable dynamic generation during runtime click here for our guide.

Only the areas of the level that possessed pawns are near will be generated.

Enabling Generation around Nav Invokers

To enable this setting we must firstly go to the project settings.

Project settings

Once the project settings are open, click on the Navigation System tab.

Navigation system

Tick the checkbox named: Generate Navigation Only Around Navigation Invoker.

This tells the engine to only generate around actors that have the navigation invoker component.

Enable nav invoker generation

Nav Invoker Component

To enable navigation generation on an actor, we first need to add the Navigation Invoker Component.

Nav invoker component

To add this to your actor, click the Add Component button in the top left of your blueprint editor and search for Navigation Invoker.

Adding the nav invoker

Once this component is added, setup the radius that the navigation mesh will be generated and removed.

Adding the nav invoker

From my testing, the default values work well for open world landscape levels.

Default settings for nav invoker

When creating a procedurally generated indoor level, I recommend slightly higher values.

This prevents the actor from being trapped in their current room or area.

Settings for procedural halls

Demonstration and Example Files

Conclusion

That is all for enabling open world navigation in Unreal Engine 4!

Characters and pawns can now traverse large open or procedurally generated levels.

For further reading into the navigation functions in Unreal Engine, click here for the official documentation.

Share your thoughts

2 Replies to “Open World Navigation in Unreal Engine 4”

  1. Hey just double checking, you still need a nav mesh volume for this to work right?
    eitherway thanks for this, really helped me out 🙂

    1. Yes you will still need a nav mesh volume around the area that you want your AI to move around.

      I’m glad you found this guide helpful!

Leave a Reply

Your email address will not be published. Required fields are marked *