# NavMesh - runtime update - Am I doing it wrong ?

**URL:** <https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [February 28, 2023, 1:38pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468 "2023-02-28T13:38:37Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 1:38pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/1 "2023-02-28T13:38:37Z")

</div>

Hello guys.

i’m facing an issue i’m not understanding ( beginner )

When my navmesh volume does not update (when something is moved), every thing run fine :

> **[VEED - UE5\_1.gif](https://www.veed.io/view/d19665bc-6018-4d4e-8535-c1d173e13861?sharingWidget=true&panel=share)**
>
> Make stunning videos with a single click. Cut, trim, crop, add subtitles and more. Online, no account needed. Try it now, free. VEED

But when I set it do dynamic here :

 ![Capture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/a/24a2d3deb7aae559c17191bc6624bfc2172a3ce3.png)

Everything is going crazy 😕

> **[VEED - UE5\_2.gif](https://www.veed.io/view/5f5dfe53-d2e7-47d4-8c12-144dae044550?sharingWidget=true&panel=share)**
>
> Make stunning videos with a single click. Cut, trim, crop, add subtitles and more. Online, no account needed. Try it now, free. VEED

Am i doing it wrong ? Is it possible to update it like once per second and not more ?

I am just searching the equivalent to this :

> [@How To Update NavMesh's Realtime \[Tutorial\]](https://forums.unrealengine.com/t/how-to-update-navmeshs-realtime-tutorial/4457):
>
> In this tutorial we have a simple AI character moving from point A to B. Before he gets to point B, we will block him off and he will automatically figure out a way to get to point B. We do this by making use of the Rebuild at Runtime feature for Nav Mesh’s. [[Unreal Engine 4 Tutorial - NavMesh Rebuild Realtime] ](https://www.youtube.com/watch?v=UpbaCHTcNPA) Hope it helps! Tesla.

---

<div class="post-metadata">

**Author:** ![DavidCR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidCR](https://forums.unrealengine.com/u/DavidCR)\
**Post date:** [February 28, 2023, 3:54pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/2 "2023-02-28T15:54:26Z")

</div>

Try to remove that nav mesh, enable the Dynamic option on Project Settings and add a new Nav Mesh into your Level.

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 4:10pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/3 "2023-02-28T16:10:17Z")

</div>

Unfortunately, that’s not better. But thank you anyway for the try !

i’m trying some changes to get clue of what happening but nothing for now 😕

Here is some more parameter I set :

 ![Capture2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/5/fd5261638aa28aa4ade1873f8c6a7194d0ebd7de.png)

---

<div class="post-metadata">

**Author:** ![DavidCR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidCR](https://forums.unrealengine.com/u/DavidCR)\
**Post date:** [February 28, 2023, 4:15pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/4 "2023-02-28T16:15:26Z")

</div>

Can you explain why nav mesh is blocked on the 2nd gif?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/8/528d8b2e0dcd5ecbef0a496059d492bcdd5f99cf.jpeg)  
Do you have any mesh modifier? Or something that can be blocking the path ?  
Noticed that in the corner, there is navegable path, so it looks to be only in that location.

---

<div class="post-metadata">

**Author:** ![DavidCR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidCR](https://forums.unrealengine.com/u/DavidCR)\
**Post date:** [February 28, 2023, 4:23pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/5 "2023-02-28T16:23:25Z")

</div>

I suggest to modify those values only once you got the nav mesh working properly.

I strongly recommend you to create a new level and just add into there a nav mesh (dynamic) and a blocking volume (tree, animal, etc.).

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 5:02pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/6 "2023-02-28T17:02:06Z")

</div>

Thank you guys for your answers.

There is no nasmesh modifier in my level, just character blueprint ( cow and chiken, and actor blueprint for the tree)

The more i’m doing testing, the more i’m realising that maybe, a character SHOULD NOT have “Can ever affect navigation” enabled, because when it’s time to AImove, then it is blocking itself in fact i think.  
So i should just enable collisions, and it would be fine, but when a cow have to move to a new location, it will not take in consideration a cow on its path ( but it will collide with it)  
I hope i’m clear. I think i do not have the right approch here, and don’t even know if this is possible for a character affecting navigation to calculate its path igoring himself)

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 5:03pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/7 "2023-02-28T17:03:52Z")

</div>

> [@DavidCR](#):
>
> Noticed that in the corner, there is navegable path, so it looks to be only in that location.

The portion of the navmeshvolume where there are characters turns red ( just this area) every time it update itself, then turn green again. but here, it is updating continuously so always red

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 5:05pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/8 "2023-02-28T17:05:18Z")

</div>

( I made new tests from a scratch project, and I got the same behaviour. A character seem not to be able to have affect navigation enabled, or, in the other way, something having the ‘affect navigation’ enabled, can be move manually, but can no move itself)

In fact, all i need is an “ignore self” option for navigation. Does it exist ?

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 5:18pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/9 "2023-02-28T17:18:06Z")

</div>

Yes I think I’m right, someone had the same issue and find a solution on UE4 but I can’t find the same trick in UE5 :

> [@AI navigation blocking self?](https://forums.unrealengine.com/t/ai-navigation-blocking-self/326358):
>
> I have an pawn controlled by an AI controller with a behavior Tree. I had it working so that the pawn used the move to node to avoid obstacles. I switched the runtime generation on the navmesh to dynamic and now the pawn seems to block itself. When the pawn moves the nav mesh updates red around the pawn and the pawn kind of stutters instead of moving correctly. It seems like its blocking it’s own path. Is there a way to fix this?

---

<div class="post-metadata">

**Author:** ![DavidCR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidCR](https://forums.unrealengine.com/u/DavidCR)\
**Post date:** [February 28, 2023, 5:20pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/10 "2023-02-28T17:20:22Z")

</div>

Can you disable collision here?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/5/ad59646a9604bc8ca205dd3bbe724e0c47a487b2.png)

Maybe it’s better to just Set CanEverAffectNavigation to false regarding to characters pawn.

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 5:45pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/11 "2023-02-28T17:45:38Z")

</div>

> [@DavidCR](#):
>
> Maybe it’s better to just Set CanEverAffectNavigation to false regarding to characters pawn.

Yes I think that’s it. I don’t know how other poeple manage this. But the characters are running and colliding in each other if there are moving on one other path …

I found the avoid parameters in the characterMovement but can’t manage yet how it works as it seem to do nothing here ( or not updating at runtime)

![Capture3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/a/c6a69cca7581141c33d1519bebd61d7609623ea1.png)

---

<div class="post-metadata">

**Author:** ![DavidCR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidCR](https://forums.unrealengine.com/u/DavidCR)\
**Post date:** [February 28, 2023, 5:57pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/12 "2023-02-28T17:57:35Z")

</div>

By default, characters don’t affect navigation. Do you changed that?

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [February 28, 2023, 6:02pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/13 "2023-02-28T18:02:33Z")

</div>

Yes exactly. i’m searching a solution to make character avoid other character getting on their path when moving to a point

---

<div class="post-metadata">

**Author:** ![DavidCR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DavidCR](https://forums.unrealengine.com/u/DavidCR)\
**Post date:** [February 28, 2023, 6:04pm UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/14 "2023-02-28T18:04:28Z")

</div>

Oh, I got it.  
Hopefully this may help 🙂  
[Using Avoidance With the Navigation System | Unreal Engine 4.27 Documentation](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/NavigationSystem/Avoidance/)

---

<div class="post-metadata">

**Author:** ![Hdubs37](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hdubs37/32/88714_2.png) [@Hdubs37](https://forums.unrealengine.com/u/Hdubs37)\
**Post date:** [March 6, 2023, 10:14am UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/15 "2023-03-06T10:14:24Z")

</div>

Well I have finally found out how to solve my issue. The solution is simply to change the ai controller class.  
Hope it helps someone else 🙂

Can’t find how to tag it as resolved… I wonder why every basic things are complicated with epic games !

---

<div class="post-metadata">

**Author:** ![paulzuo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@paulzuo](https://forums.unrealengine.com/u/paulzuo)\
**Post date:** [November 9, 2023, 8:48am UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/16 "2023-11-09T08:48:29Z")

</div>

Please teach me how can i change the ai controller class? where is it?

---

<div class="post-metadata">

**Author:** ![adeelyaqoobj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/adeelyaqoobj/32/680629_2.png) [@adeelyaqoobj](https://forums.unrealengine.com/u/adeelyaqoobj)\
**Post date:** [May 18, 2024, 4:28am UTC](https://forums.unrealengine.com/t/navmesh-runtime-update-am-i-doing-it-wrong/780468/17 "2024-05-18T04:28:17Z")

</div>

@paulzuo  
Change the AI controller class to "Deteor AI Controller class and in the AI character under Character Movement Component, check the option “Use RVO Avoidence”  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/e/dfeaf26c415a2e884073f7c9be291e4aa905a258.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/e/69e932d6406e7a325dce4f8a2e51a2fedf71ade5.png)
