Create NavMesh at runtime

I’m trying to create large procedurally generated world and set navigation using NavMesh and Nav Invokers. The problem is when my NavMesh volume is 10^5 X 10^5 Х 10^5 navigation genereting normally, but when I’m trying to make it 2 * 10^5 X 2 * 10^5 Х 2 * 10^5 navigation is not generating (no green tiles on surface).

Hey @Fedotich!

You may want the procedural generation to include a navmesh with the generation. Don’t be afraid to let them overlap, that’s fine. But the problem isn’t that the Navmesh is too small, it’s that you’re trying to make it too big. It’s taking a long time to redraw because when you add space it has to redraw the entire navmesh.

So say you’re adding in chunks, add a navmesh at the center of each chunk upon generation of the area.

1 Like

Thank you! But it seems like I can’t spawn NavMesh Volume at runtime In BP. Shoud I try to do it in C++? Is there any pitfalls? I saw some previous topics like this How to build navmesh for dynamically sized procedural level - #7 by Gennady, but there are no clear answer how to create navmeshes dynamicly.
Just in case, I want to create navmesh volume on each special floating battle island and size of Navmesh volume should be around 10k x 10k x 2k units

Other words, how can I exactlly do this if I’m creating limited 3D grid of floating islands on BeginPlay stage?

You need to use a dynamic navmesh. The thing is, the size you’re using sounds very large. It will take a minute or two. This is the kind of thing usually hidden behind a loading screen, but you will want to break it up into as many navmeshes as you need, don’t just make one big-giant-huge one and it should go a lot better.

I already have dynamic navmesh. I have tried to split one big navmesh into smaller parts, but it seems like it doesn’t helped at all. Moreover thats seems to be not optimal solution because I can have my battle islands (closed in circles) in random spots (blue dots) and I dont really want Navmesh for each of this dots.

Ok, tweak some RecastNavMesh settings and with my current settings I see navigation like this. The problem now is navigation generates above and under player. And it highlited witch red color, so it still doesn’t work for AI