# How to build navmesh for dynamically sized procedural level

**URL:** <https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586>\
**Category:** World Creation\
**Tags:** unreal-engine, dynamic, navmesh, procedural, question\
**Created:** [August 10, 2014, 5:05am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586 "2014-08-10T05:05:24Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![FakeEnema](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FakeEnema](https://forums.unrealengine.com/u/FakeEnema)\
**Post date:** [August 10, 2014, 5:05am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/1 "2014-08-10T05:05:24Z")

</div>

I’m building a level generator that makes levels of a generally rectangular shape, but of a dynamic size along the X & Y axes. I have a blueprint that scales the navmesh volume actor in the X & Y so that it encompasses the walkable ground (including enough buffer in the Z direction), but it does not seem to be rebuilding the navmesh during runtime upon level load (no green area with navigation visualization on and no response to input), even though runtime rebuilding is enabled. I’m guessing the runtime rebuiliding only supports the moving or scaling of actors within the navigation volume, and not scaling of the navigation volume itself. So how would I go about handling navigation for a procedural level like this?

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [August 11, 2014, 1:25pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/2 "2014-08-11T13:25:14Z")

</div>

I’ve had a quick look at the code and it seems we don’t support runtime navigation bounds scaling. Here are some thing you can do:

- you can have one big volume encompassing the whole possible generated level space. This should not have a big impact on navmesh generation time.
- you can expose `UNavigationSystem::OnNavigationBoundsUpdated` and call it with the scaled `ANavMeshBoundsVolume`. This should work, but I’m not 100% sure it will. Let me know if it does if you decide of this route.
- you could try streaming NavMeshBoundsVolume in. Again, not sure if it will work since we don’t use this approach internally.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![FakeEnema](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FakeEnema](https://forums.unrealengine.com/u/FakeEnema)\
**Post date:** [August 12, 2014, 1:51am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/3 "2014-08-12T01:51:34Z")

</div>

I went ahead and exposed UNavigationSystem::OnNavigationBoundsUpdated, and called it from my level generator blueprint. Once I changed the navigation bounds volume to Movable it worked. So, thanks!

I should mention that the function has a comment on it that says that if it’s going to be used at runtime then it should probably be optimized, and it does take a little bit to generate at game start. So now you know that some people are indeed going to be using it at runtime.

Thanks again,  
Eric

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [August 12, 2014, 11:56am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/4 "2014-08-12T11:56:59Z")

</div>

There’s not much performance to be gained in your use case. Building navmesh once on level load/start can go with what’s currently there, you do it once and you’re fine for the rest of the level. If we wanted to use this in a frequent-rebuilding scenario then it could use some more attention.

–mieszko

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d1f1e259](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d1f1e259](https://forums.unrealengine.com/u/anonymous_user_d1f1e259)\
**Post date:** [February 15, 2015, 8:43pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/5 "2015-02-15T20:43:47Z")

</div>

Can you please provide some insight into how you scaled the ANavMeshBoundsVolume at runtime ? I’m in the same boat but can’t figure out how to scale the brush / volume. I’ve already isolated the object in code. Thanks!

---

<div class="post-metadata">

**Author:** ![FakeEnema](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FakeEnema](https://forums.unrealengine.com/u/FakeEnema)\
**Post date:** [February 25, 2015, 7:10am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/6 "2015-02-25T07:10:30Z")

</div>

Sorry for the delayed response. I did the actual scaling in Blueprints. I exposed the UNavigationSystem::OnNavigationBoundsUpdated function to Blueprints, and called SetActorScale3D on the NavMeshBoundsVolume in my level generation blueprint, and then called the OnNavigationBoundsUpdated node afterwards.

---

<div class="post-metadata">

**Author:** ![Gennady](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gennady](https://forums.unrealengine.com/u/Gennady)\
**Post date:** [July 26, 2015, 6:52am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/7 "2015-07-26T06:52:51Z")

</div>

Streaming volumes (i add one per level chunk) works too.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_23c91a471](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_23c91a471](https://forums.unrealengine.com/u/anonymous_user_23c91a471)\
**Post date:** [June 5, 2016, 5:32pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/8 "2016-06-05T17:32:50Z")

</div>

@MieszkoZ

```
UNavigationSystem::OnNavigationBoundsUpdated

```

this doesn’t work in c++, I mean it works but the other way round so if you re-scale your navMeshVolume in code and hit play nothing happens but as soon as you stop the play mode and get back in to editor mode changes get applied, Can anyone tell me if there is any performance or memory footprint if I create massive navigation mesh ?  
I have procedural dungeon generator done in c++ from my portfolio and the thing is that entire level size can be changed at run time witch means I will either have to scale nav mesh volume witch is impossible at run time or I will have to create nav mesh volume big enough to cover all possible level sizes but what if I create nav mesh approx. 10000x 10000y 500z but my map will be only 100x 100y and 500z at the time ? will this have impact on game performance or will it have memory footprint etc. or it will only allocate as much memory as needed ?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [January 31, 2023, 12:45am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/9 "2023-01-31T00:45:05Z")

</div>

> [@anonymous\_user\_23c91a471](#):
>
> . 10000x 10000y 500z but my map will be only 100x 100y and 500z at the time ? will this have impact on game performance or will it have memory footprint etc. or it will only allocate as much memory as needed ?

apparently one option is to use a Recast Navmesh

> [@Modify NavMeshBoundsVolume in C++](https://forums.unrealengine.com/t/modify-navmeshboundsvolume-in-c/393964/4):
>
> To be Honest I dont know why you would ever need to attach a Navmesh to anything. If you just want to create a Navmesh around a Actor use Recast navmesh. Like showcased in the Deer Ai inside the Kite Demo take a look here: [Creating the Open World Kite Real-Time Demo in UE4 | GDC 2015 Event Coverage | Unreal Engine - YouTube](https://youtu.be/clakekAHQx0?t=2207)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/8/038e1a9e452ec8a2e4dd2b0df6549a14c9a1c94b.jpeg "Creating the Open World Kite Real-Time Demo in UE4 | GDC 2015 Event Coverage | Unreal Engine") ](https://www.youtube.com/watch?v=clakekAHQx0&t=2207)

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [January 31, 2023, 2:44am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/10 "2023-01-31T02:44:27Z")

</div>

No. The right way is to use nav invokers.  
But this was originally from a point in time where about 1/4 of the current tools existed.

---

<div class="post-metadata">

**Author:** ![TRoman07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TRoman07](https://forums.unrealengine.com/u/TRoman07)\
**Post date:** [April 19, 2024, 6:46pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/11 "2024-04-19T18:46:14Z")

</div>

Hey, do you think there are better tools currently to spawn navmesh in target areas surrounding the player?

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [April 19, 2024, 10:30pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/12 "2024-04-19T22:30:37Z")

</div>

The thing with Nav Invokers is that they do not require you to craft and cusromize nav meshe data.

They work automatically based on what is placed in the level and the settings for it (can character walk on, etc).

The use case for those is dynamic terrain/automatic generation, runtime changes etc.

Nav mesh as a custom edited thing is useful for closed projects where things wont change.  
Say something like an endless runner that spawns/respawns pieces which are standard - and can use the memory reduction you get from precalculating the mesh instead of having it generate at runtime.

---

<div class="post-metadata">

**Author:** ![bbQsauce5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bbQsauce5](https://forums.unrealengine.com/u/bbQsauce5)\
**Post date:** [April 21, 2024, 8:22pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/13 "2024-04-21T20:22:50Z")

</div>

Found a solution to the problem  
Disclaimer: I am still using UE4, so maybe this was fixed in UE5, I don’t know, but I doubt it

Invokers are a different thing that serve a completely different purpose than what asked in this thread, they are useful for huge worlds where it’s impossible to build the whole navmesh at once.

It seems that the UBrushComponent’s bounds inside ANavMeshBoundsVolume is not updated correctly when scaling the actor at runtime, this can be fixed by setting the bounds directly

```
UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());

ANavMeshBoundsVolume* BoundsVolume = GetWorld()->SpawnActor<ANavMeshBoundsVolume>();
BoundsVolume->GetRootComponent()->Bounds = YourBounds;
NavSys->OnNavigationBoundsUpdated(BoundsVolume);

```

---

<div class="post-metadata">

**Author:** ![Sauww1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sauww1](https://forums.unrealengine.com/u/Sauww1)\
**Post date:** [June 26, 2025, 1:27pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/14 "2025-06-26T13:27:36Z")

</div>

You sir just saved me after 3 days of struggle, I have a dungeon generated at begining of my level, couldn’t manage to make a navmesh for it. I now have a function that create and setup a navmesh at runtime using a box for bound, which makes the computing much faster it appear. Oh and i’m using unreal 5.5.  
My only struggle is the logs saying “LogNavigation: Warning: ConstructTiledNavMesh: Failed to create navmesh of size 0.” when i’m calling NavSys-\>Build(); but seems to work perfectly well..and with a very decent computing time.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/7/567fff654a1b2df46327b0978ca3822600de4ef6.jpeg) ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/2/df2423aba45d9de2743f98319326c6ae97178842.jpeg)

In my previous tries, the second screenshot would have taken much longer, but now is taking around .5s to .7s to rebuild, which is perfect during a loading time. Just in case somebody needs this, here is the piece of code that I came up with, It’s pretty much what you’ve seen before but works for me 🙂

Header:  
`void AddNavMesh(FVector Location, FVector Extent, FRotator Rotation = FRotator::ZeroRotator);`

Implem:

```auto
void UDungeonWorldBuilderComponent::AddNavMesh(FVector Location, FVector Extent, FRotator Rotation)
{
    ANavMeshBoundsVolume* NavMeshVolume = GetWorld()->SpawnActor<ANavMeshBoundsVolume>(ANavMeshBoundsVolume::StaticClass(), Location, Rotation);
    if (!NavMeshVolume) return;

    NavMeshVolume->GetRootComponent()->Bounds = FBox(-Extent, Extent);

    UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
    if (NavSys)
    {
        NavSys->OnNavigationBoundsUpdated(NavMeshVolume);
        NavSys->Build();
    }
}

```

I find it more surprising everyday how unreal engine C++ is lacking documentation so much. Anyway, hope it helps the next person !

---

<div class="post-metadata">

**Author:** ![caesiumone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@caesiumone](https://forums.unrealengine.com/u/caesiumone)\
**Post date:** [July 5, 2025, 10:17am UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/15 "2025-07-05T10:17:17Z")

</div>

How did you calculate the room bounds? I tried this, but some rooms are not inside the navmesh bounds.

Update: I found it.

```auto
UPROPERTY()
ANavMeshBoundsVolume* DungeonNavMeshVolume;
---------------------------------------------------------
UBrushComponent* BrushComp = DungeonNavMeshVolume->GetBrushComponent()

FBoxSphereBounds NewBounds;
NewBounds.BoxExtent = Extent;
NewBounds.Origin = Location;
NewBounds.SphereRadius = Extent.Size();
        
BrushComp->Bounds = NewBounds;

```

---

<div class="post-metadata">

**Author:** ![medwil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@medwil](https://forums.unrealengine.com/u/medwil)\
**Post date:** [July 31, 2025, 3:36pm UTC](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/16 "2025-07-31T15:36:35Z")

</div>

For anyone needing only a blueprint solution.

> [@How to expose UNavigationSystem::OnNavigationBoundsUpdated?](https://forums.unrealengine.com/t/how-to-expose-unavigationsystem-onnavigationboundsupdated/362549/2):
>
> Hey, For anyone coming here in the future, I have the solution. I had exactly the same problem. I generate the world procedurally in my game, and the standard max limit size for a single NavMeshBounds volume does not work for me. So I went through all the nodes in UE5.5.4 regarding navigation and found that you can globally access ‘get navigation system’ and then call On navigation Bounds Updated after moving your NavMeshBounds. Just place a few ‘NavMeshBoundsVolumes’ in the game and move th…
