I just wanted to post this because I wasted a lot of time with it.
This happened in 5.7 but I don’t believe it’s version-specific.
The symptom: MoveToLocation fails synchronously with EPathFollowingResult::Invalid (Code=5). NavMesh projection succeeds, controller possession is fine, all components valid. Looks like a controller/possession/movement component problem – you can waste days down that path.
The diagnostic that cracked it: show Navigation in the console during PIE revealed a cutout in the navmesh directly under the pawn — it was carving a hole in the navmesh it was standing on. Floating the pawn above the ground made the move succeed once, then fail again after it landed. With Runtime Generation = Dynamic, partial movement also produced Code=3 Aborted with Flags=40 — same root cause, different error signature.
The trap: “Can Ever Affect Navigation” was already unchecked on the Blueprint component, and it still carved. Existing Blueprints can hold stale values – the fix had to go in C++.
The fix: in the pawn’s constructor: cppMeshComponent->SetCanEverAffectNavigation(false);
Also worth checking if you have this error: if you’re on a World Partition map, make sure both the RecastNavMesh and NavMeshBoundsVolume actors have “Is Spatially Loaded” unchecked – otherwise the navmesh can exist in the editor world but never load in PIE, which produces the same Code=5.