Navigation recomputes incorrect longer path to unreachable target #78943
Description
Godot version
v4.1.rc2.official.46424488e
System information
Ubuntu 23.04, Vulkan, NVIDIA GeForce RTX™ 2060 / NVIDIA GeForce RTX™ 2060, NVIDIA Driver Version: 525.105.17, NVML Version: 12.525.105.17
Issue description
Navigation server should compute (and recompute) the shortest path to the target. In this example I have two unlinked nav meshes and we want to showcase the edge connection feature in v4.1 with this moving platform. When the connection gets broken and the agent needs to recompute the path it goes to the side instead of remaining stationary.
Expected result is like in the first part of the demo where the agent moves to the edge of the nav mesh then waits for the platform.
2023-07-02_13-26-16.mp4
Steps to reproduce
Run the demo and notice that when the agent has to recompute the path because the link is broken due to the moving platform it computes a path to the side which is not what's expected. The expected behavior is to find the point closest to the target position (on the other island) which in this case should be the middle of the platform where the moving platform connects.
This looks like a bug to me.
Activity