Automatically generated navlinks are created with incorrect polyFlags

Hi,

We’re using ARecastNavMesh::GetPolyFlags with FNavMeshNodeFlags::IsNavLink() for checking for navlinks during pathfinding.

This seems to be working incorrectly for automatically generated navlinks.

Looks like the function FRecastNavMeshGenerator::ResolveGeneratedLinkAreas(FRecastBuildConfig& OutConfig) incorrectly sets the polyFlag for generated navlinks to

OutConfig.JumpDownConfig.polyFlag = AdditionalCachedData.FlagsPerArea[*AreaIDPtr];Shouldn’t this be AdditionalCachedData.FlagsPerOffMeshLinkArea[*AreaIDPtr] ? This solved our problem to detect the links correctly.

Steps to Reproduce

  • use the automatic navlink generation experimental feature
  • check a path containing the navlinks with ARecastNavMesh::GetPolyFlags(..)
  • notice that FNavMeshNodeFlags::IsNavLink() will never return true for the generated links

This is a bug and not intentional. Your fix looks correct and has been submitted for review.

-James