Download

Why is my Navmesh constantly being rebuilt?

We have one project and the navigation is rebuilding itself almost constantly with little or no input from the user. If we build lighting, it rebuilds. If we save the map, it rebuilds. If we package a build, it rebuilds. If we make even the slightest modification such as adding a pointlight, it rebuilds lighting. If we manually load a streaming level, navigation gets rebuilt

The map is 1 persistent level with about 12 streaming levels, each about 1KM x 1KM. The streaming levels are not automatically loaded, so when in the editor I have to load them manually to get around the map as they are loaded and unloaded in-game by players proximity.

When nav rebuilds, it’s not just rebuilding a small area, as it does when you change something(although when I move a chair for example, then it only rebuilds around that area). It rebuilds all 5000+ tiles each time this is triggered.

Any ideas as to what is going on here ? Why on earth does the navmesh for the entire map need to be rebuild once the lighting is baked? I have to assume something is a miss here

Hi!
Did you ever figure this one out?

Settings to check, in the editor settings “automatically rebuild navmesh” - uncheck
in the level, in the recast navmesh settings “force rebuild on load” - uncheck
Project settings “force rebuild on load” - uncheck

Perhaps also set this to static. As long as it’s not “dynamic” it should be ok.

Is your navigation settings set to dynamic? Do you have a navigation invoker that moves around at all in your scene?

Hi, I’m just rechecking this topic. I still have the same issue… always when pressing play, the navMesh rebuilds, (also when changing keyframes of target points, but that’s normal I think), actually, it doesn’t matter because it rebuilds whenever I do anything. I’ve checked Gozu’s suggestions, but all settings in version 4.24 are a bit gone. The thing I was able to do was to set the navigation settings to Dynamic, but, still no luck: everything keeps on rebuilding. Which makes it annoying to debug.
Only when successfully rebuild, my characters walk en run to the targets.
Can somebody help me out? Thank you.

Maybe, I have to add, I’ve put several large pieces of geometry inside my level, rebuilding is okay, but it lasts too long.

To add something more next to the long rebuilding (I’ve already scaled my navigation mesh to the minimum). Even when everything is rebuilt, my characters don’t have navigation. My workaround for now, is to save again (this will result in a rebuild), and after this, I have to move a keyframe (will result in a second rebuild), and then when pressing play, the characters will have navigation.

I’ve found a solution:

  • I used navigation invokers for each character, and set the nav mesh around my total world. my characters were spawned, so this was another problem.
  • Runtime generation I had to set to dynamic
  • My world is vertical (a huge mine shaft), so I had to enlarge the vertical tiles the recastnavmesh

Still unsure what I’m doing, but it works!