Description

In GameInstance.cpp when the Navigation System is created it calls...

 UNavigationSystem::InitializeForWorld

This in turn ends up calling...

 GatherNavigationBounds();

This goes through all the NavMeshBoundsVolume Actors and pulls out the components bounding box and adds them to an array on the Nav System. This would be ok IF the components had been registered at this point, however they aren't so we end up with a Zero sized bounding box.

The knock on effect for us is that when we hit PIE or run standalone (We're using Dynamic navmesh generation) in the constructor for the generator (RecastNavMeshGenerator.cpp) it ends up needlessly recreating the recast navmesh.

As I said this problem has been there a while but 4.8 introduced some extra code to validate the number of tiles in the mesh it had serialized against the number of tiles it thinks it needs based on the bounding box size...

 CalcNavMeshProperties(MaxTiles, MaxPolysPerTile);
 if (FMath::Log2(MaxTiles) != FMath::Log2(SavedNavParams->maxTiles))
 {
 	bRecreateNavmesh = true;
 }
 

This will pretty much always be true due to the wrong bounding box size being used so will recreate the mesh.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-19707 in the post.

0
Login to Vote

Fixed
ComponentGameplay - AI
Affects Versions4.84.9
Target Fix4.10
Fix Commit2663348
Release Commit2713009
CreatedAug 6, 2015
ResolvedAug 20, 2015
UpdatedJun 23, 2018