Detecting failed pathfinding between disconnected islands in NavigationRegion3D

Godot Version

v4.2.1.stable.official [b09f793f5]

Question

I have a NavigationRegion3D that creates two separated “islands” of navmeshes, as seen below.

2024-03-0122-15-45-ezgif.com-video-to-gif-converter

What’s the best way of detecting when a NavigationAgent3D is trying to pathfind to a endpoint that is in a different “island” and is therefore impossible to get to?

Simplest way is to check the already loaded path on the agent. If the distance between target position and path end position is too large the target position is nowhere near reachable navigation mesh. So either the target position was bollox or the position is on an unreachable navigation mesh.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.