# Moving NavMesh Volume

**URL:** <https://forums.unrealengine.com/t/moving-navmesh-volume/338023>\
**Category:** AI\
**Tags:** ai-navigation, unreal-engine, editor, UE4, CPP, question\
**Created:** [November 10, 2015, 1:21pm UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023 "2015-11-10T13:21:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daltron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daltron](https://forums.unrealengine.com/u/Daltron)\
**Post date:** [November 10, 2015, 1:21pm UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023/1 "2015-11-10T13:21:02Z")

</div>

Hi, I’m trying to build a kind of infinite top-view platform using a bunch of pieces of ground that are dynamically intercalated to make the neverending illusion. Each piece has a nav mesh bounds volume (for simple “move to” behavior for my enemies)  
The problem: if i move my piece of ground and also move my NavMeshBoundsvolume in code (using SetActorLocation) the navigation is not rebuilt automatically. My moved piece of grounds get without navigation, even with the nav mesh volume also at the new position. If I do the same in editor it rebuilds (even if I move a little bit on editor while playing the game, it does).

The option “Runtime generation” is checked. Also, I have tried to call “RebuildNavigation” command by C++ but nothing happened. GetWorld()-\>GetNavigationSystem()-\>MainNavData-\>RebuildAll() didn’t work too (I don’t know if it would be the case…)

Is there a way to regenerate or “translate” a navigation mesh outside the editor using C++?

---

<div class="post-metadata">

**Author:** ![phil\_me\_up](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil\_me\_up](https://forums.unrealengine.com/u/phil_me_up)\
**Post date:** [November 10, 2015, 1:40pm UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023/2 "2015-11-10T13:40:02Z")

</div>

It looks like a few people have struggled with this. The last answer / set of comments on this page might help: [[4.7] Navmesh doesn't build at runtime (It is checked) - World Creation - Unreal Engine Forums](https://answers.unrealengine.com/questions/178683/47-navmesh-doesnt-build-at-runtime-it-is-checked.html)

---

<div class="post-metadata">

**Author:** ![Daltron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daltron](https://forums.unrealengine.com/u/Daltron)\
**Post date:** [November 10, 2015, 2:20pm UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023/3 "2015-11-10T14:20:24Z")

</div>

Thanks for the quick answer, but I’m afraid I can’t use the same solution, as I’m not able to find the “Settings (Next to Marketplace) Then general \> Navigation Mesh / Settings - rebuild at runtime” option – I’m currently using UE 4.9.2. Actually, the option for “Runtime Generation” is “Dynamic” in Project Settings (not just checked as I mentioned); “Force Rebuild on Load” makes no effect for me.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f422bcf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f422bcf](https://forums.unrealengine.com/u/anonymous_user_3f422bcf)\
**Post date:** [October 4, 2017, 1:44pm UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023/4 "2017-10-04T13:44:11Z")

</div>

Did you solve this someway?

---

<div class="post-metadata">

**Author:** ![Daltron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daltron](https://forums.unrealengine.com/u/Daltron)\
**Post date:** [February 11, 2018, 2:10pm UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023/5 "2018-02-11T14:10:04Z")

</div>

No, in fact we didn’t take this idea of “endless arena” forward.

---

<div class="post-metadata">

**Author:** ![pdenton](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pdenton/32/911626_2.png) [@pdenton](https://forums.unrealengine.com/u/pdenton)\
**Post date:** [July 12, 2020, 11:10am UTC](https://forums.unrealengine.com/t/moving-navmesh-volume/338023/6 "2020-07-12T11:10:38Z")

</div>

For the record, in UE 4.25 setting Project Settings \> Runtime Navigaton to “Dynamic” and using “RebuildNavigation” console command (either in BP or C++) after moving navmesh does the trick - navigation is rebuilt after navmesh volume is moved.

EDIT: executing console command with _ExecuteConsoleCommand_ BP node always works, but for me only

```
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), "RebuildNavigation");

```

worked in C++.
