Spawn NavMeshBoundsVolume at runtime

I have floating islands that are generated when players travel. I wanna spawn NavMeshBoundsVolume(NMBV) for these islands and use with NavInvoker component to get AI working.

I can’t just simply attach NMBV to my player, i have multiple players that can be across a million kilometers on different islands.

How can i spawn NMBV or make it infinite? Is there a way to achieve this in C++ by parenting NMBV?

Edit: Is there a way to generate NavMesh without NavMmeshBoundsVolume?

The scope of your project seems to be way above what the traditional tools of Unreal Engine can offer. I suggest you find or create your own tools that doesn’t use nav meshes.

million kilometers on different islands.

The further you stray from the origin of your level, the more inaccurate calculations will become.

Here is some further clarification regarding the terrain sizes: UE5 - World Partition - Massive Map Sizes? - #6 by noone

The basic rule of what you will require for a computer for main memory and video memory for importing and loading all cells for various world sizes is:
8km x 8km = 32GB memory and RTX-3050 8GB
16km x 16km = 64GB memory and RTX-3080 10GB
32km x 32km = 128GB memory and RTX-3090 24GB
64km x 64km = 512GB memory and RTX-8000 48GB

According to the calculation, assuming everything scales linearly, you would need a PC with 16 Petabytes of RAM for about 1 million KM in size. This also assumes you will end up using the partition system.


Could you clarify why you would want to do what you are trying to do?

1 Like

I exaggerated this value, but it is possible for players to achieve such distances. I don’t use landscapes, I have my own chunk system that spawns islands by predictable randomness.

Maybe in future i will switch to partition system. But right now everything works fine.

Unreal’s behavior trees are pretty good for grounded AI. Doing by myself will take too much time. Especially when I’m not a smart person(barely know c++).

In Unreal Engine, certain classes or components are marked as “native” or “C++ only,” which means they cannot be directly spawned or created from Blueprints. The NavMeshBoundsVolume class falls into this category and cannot be spawned directly from a Blueprint.
Chat-GPT

Then what the hell am I supposed to do? Can i even generate Nav Mesh without using NavMeshBoundsVolume?

I might be late to the party but you can try having a base level to stream with the navmeshbounds in it. so when you “spawn an island” you would actually stream an instance of that level and spawn the island in that streamed level.

You should make sure the navmesh in the streamed level wraps around the island you are going to spawn. Streaming navmeshes work in editor for me but didn’t try a build yet.

1 Like