# How to update navmesh according to a moving NavMeshBoundsVolume?

**URL:** <https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [November 13, 2014, 3:59pm UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843 "2014-11-13T15:59:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PierreMaux](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PierreMaux](https://forums.unrealengine.com/u/PierreMaux)\
**Post date:** [November 13, 2014, 3:59pm UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/1 "2014-11-13T15:59:00Z")

</div>

Hello World ^^

I working on UE 4.5.1, I’m building a game which generates levels with some square tiles (Static Mesh). This tiles collection is endless and generated according to my player location.  
I actually have a NavMeshBoundsVolume set at the world origin in my scene (it is put to movable in its parameters). This NavMeshBoundsVolume also create a raycastnav mesh that I set on ‘rebuild at runtime’.  
With a blueprint I update the NavMeshBoundsVolume position to the player location.

It can maybe be easy to understand that by following those illustrations :

 ![21071-navmesh-05.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/2/d120ca6b4cd66c6ef45880135ac4c47823fdc41f.png)

 ![21072-navmesh-06.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/7/f07f19b66109f77c8d0f3bf7dd2053eee7855f7a.png)

And the view of the blueprint that link navmesh/player position :

 ![21073-bp_navmesh.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/8/5f8bf7191d2a00a966f06b5d8f17cbccdd39da75.png)

I need to have an updated navmesh that works all this tiles.  
Due to my endless level, I want to avoid expanding the NavMeshBoundsVolume to a large scale value. So my goal in this case is to having a navmesh that don’t exceed a 5X_5Y tiles size \> 20000X_20000Y (Each tile have a size of 4000x4000).

Is it possible to recalculate the navmesh according to the moving player location in real time ?

Many Thanks.

---

<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:** [November 16, 2014, 2:03am UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/2 "2014-11-16T02:03:27Z")

</div>

I was about to answer that you should try calling `NavigationSystem.OnNavigationBoundsUpdated` after moving your `NavMeshBoundsVolume`, but realized there’s not way to get your hands on `NavigationSystem's` instance in blueprints. I’ll fix, but it won’t make it to UE4 4.6 version.

So, hack around it for now. Console command `RebuildNavigation` might help though I’m not sure if it will update navigation bounds.

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![PierreMaux](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PierreMaux](https://forums.unrealengine.com/u/PierreMaux)\
**Post date:** [December 2, 2014, 4:59pm UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/3 "2014-12-02T16:59:31Z")

</div>

I’ve tried some experiences around the Console command ‘RebuildNavigation’, but nothing seems to be really updated using only this command.  
The only way i’ve found to deal with my problem is to make a Class variable of type ‘NavMeshBoundsVolume’ and create a new instance of it using the ‘SpawnActor’ function.

![22759-navclass.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/e/e3e8b9e905bc7be2bb117e74bd3adb8d52fcbf53.png)

This method using with ‘RebuildNavigation’ seems to update the NavMeshBoundsVolume’s location… the calculated navmesh is a little bit messy but it’s maybe a starting solution in order to find a better one with this problem.

Thank you and I will follow closely about this point in the next engine’s updates.

---

<div class="post-metadata">

**Author:** ![RC\_Reshi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RC\_Reshi](https://forums.unrealengine.com/u/RC_Reshi)\
**Post date:** [August 5, 2021, 2:03pm UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/4 "2021-08-05T14:03:49Z")

</div>

Thank you! Even though being very old, this post pointed me in the right direction and saved me from going insane!

---

<div class="post-metadata">

**Author:** ![ArkadiyE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ArkadiyE](https://forums.unrealengine.com/u/ArkadiyE)\
**Post date:** [April 26, 2022, 1:32am UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/6 "2022-04-26T01:32:46Z")

</div>

> **[Modifying the Navigation Mesh](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/NavigationSystem/ModifyingTheNavigationMesh/ModifyingtheNavigationSystem/)**
>
> This guide shows how to modify the Navigation Mesh in Unreal Engine.

1. Click **Settings \> Project Settings** and go to the **Navigation Mesh** settings.  
 ![Click Project Settings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/4/794914d340c1517680d9164d727e66e334726dfa.png)

2. Under the **Runtime** section, click the **Runtime Generation** dropdown and select **Dynamic.**![Click the Runtime Generation dropdown and select Dynamic](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/d/6d7707fd8f34fdb8cce69941025d3b7f807ad409.png)

3. Go back to the Level and click **Simulate**. You should now see the Navigation Mesh update correctly.

!The examples used in this section force the constant runtime generation of the Navigation Mesh which has a high computational cost. These examples do not represent best practices, and are used for demonstration purposes only.

---

<div class="post-metadata">

**Author:** ![d.g.91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@d.g.91](https://forums.unrealengine.com/u/d.g.91)\
**Post date:** [January 18, 2024, 8:30pm UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/7 "2024-01-18T20:30:29Z")

</div>

thank you very much. it solved my problem

---

<div class="post-metadata">

**Author:** ![Gubidonius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gubidonius/32/742377_2.png) [@Gubidonius](https://forums.unrealengine.com/u/Gubidonius)\
**Post date:** [June 9, 2024, 5:08pm UTC](https://forums.unrealengine.com/t/how-to-update-navmesh-according-to-a-moving-navmeshboundsvolume/298843/8 "2024-06-09T17:08:12Z")

</div>

For the original game in the post calling RegisterNavigationInvoker() might be a better solution rather than moving a navmeshbounds manually. Especially if there are any plans for multiplayer
