AI Navigation 'suddenly' stopped working (World Partition baaad)

Just a feedback for anyone (hopefully not) stumbling on this… problem.

PROBLEM:
Enabling World Partition may cause all AI movement to stop working on some levels without saying why.

  • BT node MoveTo doesnt work
  • AI Move To node doesnt work
  • GetRandomLocationInNavigableAreaAround location is always the location
  • Calculate path always returns fails

WHY:
This is because the moment WorldParition is enabled, unreal seems to expect all levels to be paritioned. And if they arent: navigation no longer works and nothing is logged to warn it.

HOW TO FIX:
In the level there’s an object auto generated by your NavMeshBoundsVolume called ‘RecastNavMesh-Default’, on it the parameter IsWorldParitioned has to be manually set to true or false depending if the level has been paritioned.
-Note: if this object is deleted: you’ll have to reconfigure it. Never forget.

Theres a global project parameter for this in the project settings, search for IsWorldPartitioned. This does it for all levels.

Ideally Epic could by itself know if the level is partitioned and avoid us the hassle of having to manually set this bool (or suffer 5h not knowing wtf is happening and rerolling many commits back).

2 Likes

thanks for sharing!
I was pretty baffled by this because navigation worked on static and with no world partition settings enabled on the navmesh actors themselves but with a weird offset during PIE. (1. is in Editor, 2. during runtime in PIE)
Only after setting generation to dynamic and following your notes to set everything to be world partitioned it worked again.


I managed to get it working by setting the RecastNavmesh variable Is World Partitioned Navmesh to true.

For it to work, you also need to enter the command n.bNavmeshAllowPartitionedBuildingFromEditor 1 in the editor console.

Generally, following the steps from this link should do the enough: