Add NavMesh Volume to actors

I have made a game like temple run and am having troubles with the AI following the runner. I thought it was because I didn’t add a navmesh volume. So I added one, scaled it up a little too much, and my computer froze. The track I’m running on generates itself so the level is pretty much empty until I hit play. Is there a way to add a navmesh volume to the track itself and the AI will follow? I have him/her set up already.

Hello,

You can look into using a Navigation Invoker. This is a component that you can attach to your character.

The great thing about invokers is that they allow you to use large levels without having the wasted performance of a large, unnecessary Nav Mesh.

To start, go to Edit->Project Settings->Navigation Mesh and set the Runtime Generation to dynamic. Also, go to Edit->Project Settings->Navigation System and check the Generate Only Around Invokers option. Then, you’ll need to add a Nav Mesh Bounds Volume to whatever area you will be generating your level in.

After you’ve done this, go into the character(s) that you’d like to be able to use the Nav Mesh and add a Navigation Invoker component. This will allow you to alter the settings however you’d like as far as how far you want it to generate and how far away you’d like it to be before it begins removing the unused sections of the Nav Mesh.

Let me know if you run into any trouble with this.

Have a great day

2 Likes

It worker, but is there any way to not add a Nav Mesh volume and the AI still be able to move? That’s really the problem.

In order to generate the Nav Mesh, you’ll need to have the bounds volume. If you have a particularly large level, you can also consider streaming in sublevels to account for performance. You can find more information on that here: World Composition User Guide | Unreal Engine Documentation

Nevermind. It works beautifully.

1 Like

So i will set he auto generate navigation from the editor settings to false not to build the nav mesh but still use the nav mesh volume to make a bound to navigation did i understand right?

hi, can u tell me how u fix that i am facing the same problem