4.20.x and Dynamic NavMesh problem

Hi guys,

our game uses procedurally generated levels and we’re experiencing a problem with dynamic NavMesh.

On 4.17.x it all worked just fine. When we switched to 4.19.x it was not working anymore, so we had to add a little hack: once the level was generated, we forced NavMesh rebuilding via the console command (‘RebuildNavigation’), and it worked again.

Now we moved to 4.20.x and it doesn’t work again. At all, even with the RebuildNavigation hack (which, by the way, seems like it’s not a console command anymore…where did it go?).

We know that NavigationSystem has been refactored and moved to a dedicated module, we already changed all the relative header includes and code, but do you guys have any idea on what would be the right setup to make it work again with procedurally generated levels?

We also saw that there are now quite a few new options in Project Settings → Navigation System, and we already tried to enable/disable them to see what would happen, to no avail.

Thanks for your help!

Hi, have you found any solution for this problem? We are having the same issue regarding the RebuildNavigation hack.
Thanks!

Hi and Harley,

Are you both using what is now called UNavigationSystemV1? If so, does directly calling its Build method work? (That’s all the RebuildNavigation command does.)

Hi ,

yes, we’re currently using UNavigationSystemV1. What we noticed is that sometimes the navmesh is not being generated at all. To make it work, we need to change the supported Nav Agents Radius or Height in the Project Settings. Other times, the nav mesh is not generated only in certain levels; in such cases, we just remove any profile for supported Nav Agents in Project Settings, and it works again (until the next time…).

The Build method does not solve the problem (it used to work when we used the old NavigationSystem’s RebuildNavigation method).

Hi , is there any way to call this Build method from Blueprints?

Hi ,

Are you using level streaming for your procedural generation?

Hi Harley,

That function is not directly exposed to Blueprint, but what you could do is create a Blueprint function library in C++ that has a function in it to call Build on a nav system.

Yes, exactly. We use level streaming.

Thanks , undesrtood.

However I am afraid we are having the same problem as . We are also using level streaming for procedural generation and where the old RebuildNavigation command method worked before, the new Build method fails.

Any idea?

We seem to be encountering the same issue on 4.20.2

Yep, the problem is still there. We managed to find a workaround for now (having a Nav Mesh Bounds Volume that atuomatically centers and resizes itself to encompass the whole procedurally generated level).