I have question about my poblem with navmesh. I’ve created procedural terrain using UProceduralMeshComponent and added dynamic navigation using UE4 navmesh. Each building on screenshot is a NavigationInvoker. Placing new building will add new navigation invoker to the map and should generate another part of NavMesh. Sadly it seems very often Navmesh is broken (as you can see on screenshot) and characters navigation is not working.
I can load my game state like 10 times and around 2-3 times I will get NavMesh correct.
I’m wonder if someone would be able to help me spotting issue with navmesh. I was considering that maybe my collisions on UProceduralMeshComponent are not ready yet. What I tried is to regenerate navigation mesh with delay of 5-10 seconds after loading level, but still same effect.
Are there any known issues with UProceduralMeshComponent and NavMesh component for large procedural terrains ?
This is how it looks when ProceduralMesh works and generation was ok.
I’ve made some progress with my NavMesh problem but seems I’m stuck with assigning/enabling correctly generated NavMesh data. It seems that when I do update my procedural terrain NavMesh Data is broken. I did search and it seems that MainNavData and AbstractNavData are somehow broken are without removal is unable to regenerate correctly.
When i added this code :
This seems as very promising results but even navmesh is looking ok no character can navigate on it. Sadly I was so far unable to find a way to force all characters/actors to use new navmesh data. If someone has experience with recreating navmesh and reassigning new data to characters I appreciate all hints.
Next part I’ve check was to recreate whole navigation system for world with following code :
This clear data perfectly but I was never able to see navmesh in the world after recreating it - dont know what is causing this. Here is how world looks after clearing :
Does anyone has experience of recreating, rebuilding navmesh on runtime. With rebuilding I would need to completely clear existing navmesh data as it seems something is causing it to bad dynamic rebuilds with procedural meshes.