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.

9 Comments

  1. I tried this only works on two legged people have it set on my deer and it moves but very jurky like it does not know where to go any help fixing this or is this not meant for the 4 legged animals

    • This works with any type of character. I have used this AI in previous projects with wolves, bears and other 4 legged creatures. If you could explain what exactly is happening to your AI we can track down the issue and get it fixed.

      • some times a pain in the but just started new level put down nav mesh check only use nav mesh invokers add them to my deer and zombie put them both in the world NOTHING they just stand there

  2. nav mesh invokers is broken in the new engine will not work like all of the videos on you tube where you put down the nav mesh and add invoker the add person to scene then poof wow it works NOT

Leave a Reply

Your email address will not be published.


*