# Should WorldPartitionNavigationDataBuilder initial IterativeWorldBounds using NavigationBounds instead of EditorBounds?

**URL:** <https://forums.unrealengine.com/t/should-worldpartitionnavigationdatabuilder-initial-iterativeworldbounds-using-navigationbounds-instead-of-editorbounds/1211049>\
**Category:** Programming & Scripting\
**Tags:** Navigation, navmesh-bug, unreal-engine, navmesh\
**Created:** [June 26, 2023, 12:00pm UTC](https://forums.unrealengine.com/t/should-worldpartitionnavigationdatabuilder-initial-iterativeworldbounds-using-navigationbounds-instead-of-editorbounds/1211049 "2023-06-26T12:00:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madeesse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@madeesse](https://forums.unrealengine.com/u/madeesse)\
**Post date:** [June 26, 2023, 12:00pm UTC](https://forums.unrealengine.com/t/should-worldpartitionnavigationdatabuilder-initial-iterativeworldbounds-using-navigationbounds-instead-of-editorbounds/1211049/1 "2023-06-26T12:00:37Z")

</div>

I found a variable IterativeWorldBounds in UWorldPartitionBuilder, when call UWorldPartitionBuilder::Run function, by default, it will use ` WorldPartition->GetEditorWorldBounds()` as CellInfo.EditorBounds. While IterativeWorldBounds is Valid, it will use `IterativeWorldBounds` as CellInfo.EditorBounds.

I have seen only UWorldPartitionMiniMapBuilder override the variable IterativeWorldBounds in PreRun function, it use ` WorldMiniMap->GetMiniMapWorldBounds()` instead of EditorBounds to calculate CellInfo.EditorBounds.

if we generate navigation in a very big world, and the world bounds is huge, but our navigation bounds is small than the world. So if i generate navigation in this world,it will iterate many times for nonavigation and useless place.

In this situation, I think it will be better to use navigation bounds as IterativeWorldBounds not editor bounds in UWorldPartitionNavigationDataBuilder. So i want to know if engine has considered to do this for optimizing navigation build in big world.

---

<div class="post-metadata">

**Author:** ![madeesse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@madeesse](https://forums.unrealengine.com/u/madeesse)\
**Post date:** [June 27, 2023, 3:22am UTC](https://forums.unrealengine.com/t/should-worldpartitionnavigationdatabuilder-initial-iterativeworldbounds-using-navigationbounds-instead-of-editorbounds/1211049/2 "2023-06-27T03:22:32Z")

</div>

I personaly add this code in UWorldPartitionNavigationDataBuilder::PreRun, it seems to be working fine for generating navigation.

 ![Pasted image 20230627111647](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/6/a862b94cf69dd3d0e519a91c6283cd2fb24380e5.png)

the code is

```auto
// World bounds to process  
UNavigationSystemBase* NavSystem = World->GetNavigationSystem();  
if (NavSystem == nullptr)  
{  
UE_LOG(LogWorldPartitionNavigationDataBuilder, Verbose, TEXT("No navigation system to generate navigation data."));  
return false;  
}  
IterativeWorldBounds = NavSystem->GetNavigableWorldBounds();

```

but I don’t know if it is right way to optimize navigation building
