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 returnfalse
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:
- Is this the expected behavior of
FindPathToActorSynchronously
? - Does
IsValid()
only check if the pathfinding operation ran correctly, rather than if a full path exists? - 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.