# Adjusting ANavMeshBoundsVolume bounds at runtime

**URL:** <https://forums.unrealengine.com/t/adjusting-anavmeshboundsvolume-bounds-at-runtime/306996>\
**Category:** C++\
**Tags:** navigation-mesh, Navigation, unreal-engine, CPP, question\
**Created:** [February 15, 2015, 7:18am UTC](https://forums.unrealengine.com/t/adjusting-anavmeshboundsvolume-bounds-at-runtime/306996 "2015-02-15T07:18:13Z")\
**Posts on this page:** 2\
**Page:** 1

<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, 7:18am UTC](https://forums.unrealengine.com/t/adjusting-anavmeshboundsvolume-bounds-at-runtime/306996/1 "2015-02-15T07:18:13Z")

</div>

Hello,

I have a level which I have added a NavMeshBoundsVolume to via the editor.

After spawning some static mesh instances I’d like to update the location and bounds of the ANavMeshBoundsVolume instance I placed in my level. I’m attempting to do so like so :

```
UNavigationSystem* NavSystem = GetWorld()->GetNavigationSystem();

	if (NavSystem)
	{
		for (TActorIterator<ANavMeshBoundsVolume> It(GetWorld()); It; ++It)
		{
			ANavMeshBoundsVolume* V = (*It);
			if (V != NULL && !V->IsPendingKill())
			{
				V->SetActorLocation(FVector(0, 0, 0));
				UBrushComponent* Brush = V->GetBrushComponent();
				Brush->Brush->Bounds = FBox(FVector((this->Bounds->x() * 100), (this->Bounds->y() * 100), 0), FVector(((this->Bounds->x() + this->Bounds->width()) * 100), ((this->Bounds->y() + this->Bounds->height()) * 100), 200));
				NavSystem->OnNavigationBoundsUpdated(const_cast<ANavMeshBoundsVolume*>(V));
			}
		}
	}

```

It looks like the location of my nav mesh bounds volume is updating, but the bounds of the brush don’t seem to have changed.

Any idea what I’m doing wrong here? Examples about this kind of thing are pretty sparse.

Thanks!

- 

Edit : Apparently there was some previous discussion about the topic here: [How to build navmesh for dynamically sized procedural level - World Creation - Epic Developer Community Forums](https://answers.unrealengine.com/questions/81497/how-to-build-navmesh-for-dynamically-sized-procedu.html)

---

<div class="post-metadata">

**Author:** ![aarongreenhill](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aarongreenhill](https://forums.unrealengine.com/u/aarongreenhill)\
**Post date:** [September 2, 2024, 3:22pm UTC](https://forums.unrealengine.com/t/adjusting-anavmeshboundsvolume-bounds-at-runtime/306996/2 "2024-09-02T15:22:06Z")

</div>

This is a top google result - the answer is over here, see April 21, 2024 response which seems to work for me:

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