# Create NavMesh at runtime

**URL:** <https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [May 3, 2023, 11:03pm UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571 "2023-05-03T23:03:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fedotich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fedotich](https://forums.unrealengine.com/u/Fedotich)\
**Post date:** [May 3, 2023, 11:03pm UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/1 "2023-05-03T23:03:43Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [May 3, 2023, 11:55pm UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/2 "2023-05-03T23:55:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Fedotich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fedotich](https://forums.unrealengine.com/u/Fedotich)\
**Post date:** [May 4, 2023, 7:06am UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/3 "2023-05-04T07:06:21Z")

</div>

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](https://forums.unrealengine.com/t/how-to-build-navmesh-for-dynamically-sized-procedural-level/290586/7), 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

---

<div class="post-metadata">

**Author:** ![Fedotich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fedotich](https://forums.unrealengine.com/u/Fedotich)\
**Post date:** [May 4, 2023, 5:46pm UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/4 "2023-05-04T17:46:06Z")

</div>

> [@Mind-Brain](#):
>
> add a navmesh at the center of each chunk upon generation of the area

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

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [May 5, 2023, 12:53am UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/6 "2023-05-05T00:53:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Fedotich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fedotich](https://forums.unrealengine.com/u/Fedotich)\
**Post date:** [May 5, 2023, 10:36am UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/7 "2023-05-05T10:36:25Z")

</div>

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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/1/d713ed9e954900d70f8d6f4227eb5a8462fe5589.jpeg)

---

<div class="post-metadata">

**Author:** ![Fedotich](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fedotich](https://forums.unrealengine.com/u/Fedotich)\
**Post date:** [May 5, 2023, 4:38pm UTC](https://forums.unrealengine.com/t/create-navmesh-at-runtime/1153571/8 "2023-05-05T16:38:22Z")

</div>

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/2/a82503c62a8a16469b009cf5e11475a4fa33e217.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/5/de57697e3e7fec9203efecc03c568385a026236b.jpeg)
