Dynamic Navigation and Procedural Mesh

Hello,

I have a procedural mesh inside a navmesh bounds volume (Force Rebuild checked in Project settings and RecastNavMesh as well as Runtime Generation set to Dynamic) and my issue is that when I edit the geometry from Blueprint (with the “Update mesh section” function and with Collision generation) the navigation is not recalculated.

I noticed that if I move the Procedural mesh in the viewport or through Blueprint, the navigation recalculate and I have a navmesh corresponding to my new geometry. I suppose the navigation is only rebuilt when a geometry has moved inside a navmesh bounds volume (which make sense) so my current solution is to move my procedural mesh (0.01 on the Z axis) and to put it back to its original place in the same frame (no impact for the players) every time I edit the geometry.

I was wondering if there is another solution? I did not find any “Notify navigation” or “Force rebuild” function nor in the engine or on the internet.

Thank you! that is awesome. I have resolved the same issue with the offset trick that you have mentioned.

Instead of jittering your object’s location to force an update, you can do this: UNavigationSystem::UpdateComponentInNavOctree(*MyProceduralMeshComponent);

For anyone wondering, the mentioned method was deprecated and it said to use this instead: FNavigationSystem::UpdateComponentData(*MyProceduralMeshComponent)