If the level has hidden sublevels, the regenerated navmesh result appears to have a hidden sublevel mesh placed at the origin.
Apparently, the reason is that bNavigationRelevant is no longer considered when exporting the mesh since 4.24.
The following workaround worked
void FNavigationDataHandler::UpdateActorAndComponentsInNavOctree(AActor& Actor) { INavRelevantInterface* NavElement = Cast<INavRelevantInterface>(&Actor); if (NavElement) { UpdateNavOctreeElement(Actor, *NavElement, FNavigationOctreeController::OctreeUpdate_Default); } for (UActorComponent* Component : Actor.GetComponents()) { INavRelevantInterface* CompNavElement = Cast<INavRelevantInterface>(Component); if (CompNavElement) { // Component != null is implied by successful INavRelevantInterface cast if (Actor.IsComponentRelevantForNavigation(Component) && Component->bNavigationRelevant ) //this line { UpdateNavOctreeElement(*Component, *CompNavElement, FNavigationOctreeController::OctreeUpdate_Default); } else { UnregisterNavOctreeElement(*Component, *CompNavElement, FNavigationOctreeController::OctreeUpdate_Default); } } }
Result:
Incorrect navmesh is displayed in center of the level (0.0, 0.0, 0.0 ).
please see screenshots below.
1. opend level (sublevel is hidden)
[Image Removed]
2.moved a mesh and an incorrect navmesh is regenerated
[Image Removed]
3. once the sublevel will be visible
[Image Removed]
4. If hiding the sublevels again, the navmesh stays normal .
[Image Removed]
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
Delay nodes occasionally don't fire the "Completed" output in a nativized build
Teleporter in the Creative Hub is Locked and cannot be accessed
What property of the Slider is the image used when dragging?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-102671 in the post.
6 |
Component | UE - AI - Navigation |
---|---|
Affects Versions | 4.24, 4.25, 4.26 |
Created | Nov 6, 2020 |
---|---|
Resolved | Jul 19, 2022 |
Updated | Jul 19, 2022 |