FindPathToActorSynchronously always returns IsValid() == true even when the goal is fully enclosed by walls

Hi everyone,

I’m currently using UNavigationSystemV1::FindPathToActorSynchronously() to check whether an AI character can reach a given actor. However, I’m getting unexpected behavior: even when the goal actor is located in a completely enclosed area (surrounded by walls with no entrance), the returned FPathFindingResult still reports IsValid() == true.

Here’s what I did:

  • The character is standing outside a sealed room.
  • The goal actor is placed inside that room, which is fully blocked off by static meshes with collision enabled.
  • Despite the room being inaccessible, the function still returns a valid path result.

Attached is a screenshot showing the character position and the unreachable goal area.

My expectations:

  • I assumed that IsValid() would return false if there’s no navigable path between the start and the goal.
  • But it seems like the pathfinding still reports a result, even though it shouldn’t be reachable.

Questions:

  1. Is this the expected behavior of FindPathToActorSynchronously?
  2. Does IsValid() only check if the pathfinding operation ran correctly, rather than if a full path exists?
  3. What would be the correct way to verify whether an AI can actually reach a target?

Any clarification would be greatly appreciated!

Thanks in advance.

As you suspected, IsValid just returns whether or not the operation ran correctly.

For lack of a better way, I’d suggest using IsPartial to check whether you got a proper path or not: