Navmesh Rebuild at runtime in unreal engine 5

I made a random level generator using Level streaming, and I need the new rooms that will appear to also have a navigation area (well, that is, navmesh), I have stretched NavMesh to the entire level, and I need to make it rebuild at runtime

Hi @Metallic_emperor
Yes, it is possible.
Select your RecastNavMesh in your outliner, go to the “Runtime” category and select “Dynamic” under Runtime Generation.

+++
jnat

1 Like

This did not help, navigation is not generated on the level instance

Is your navmesh bounds volume instanced in your level instance as well ?

Yes

Maybe by forcing the navigation system to use dynamic generation at runtime through the project settings can help (Overview Of How To Modify The Navigation Mesh In Unreal Engine | Unreal Engine 5.4 Documentation | Epic Developer Community)

As long as your navmesh bounds volume is in your level it should work fine, but I need to put a scene to test it on my side. (but I can’t right now since it’s kinda late)
I’ll have a look at this post in the next days to see if you found anything on your side.

I tried to set dynamic generation in the settings, but it did not work. I noticed that when creating new level instances, the nav grid tries to regenerate, but nothing changes. Also, if you hide persistent level in the levels tab, the nav mesh also disappears

  • I was able to fix this problem somehow, but another problem arose, the characters do not move on the nav mesh and I do not know what to do about it.

Please tell me how the problem was solved. I have a building floor loaded and the navigation volume is moved to its position, but it is not updated. Thank you.

In my personal experience, NavMesh only works in the persistent level. It does NOT work in sub levels, streaming level or level instances. I’ve never been able to get that to work. You can try putting navmesh, volumes, whatever, they all get ignored unless they’re in the persistent level.

If someone has a solution to this, I’d like to hear it because I’ve tried everything.

BTW, for level streaming, just set your navmesh volume to be big enough and set the nav mesh to be dynamic and that should work. But all navigation has to be in the persistent level.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.