PathfindingService computes paths through areas too small for agents to fit through

Reproduction Steps

1. Create a gap between two walls 3 studs wide.
2. Compute a path with an agent radius of 2, (diameter of 4) such that the gap in the wall lies between the start and the goal.

Here is a demo place I’ve created to display the issue.
PathfindingBugRepro2.rbxl (33.1 KB)


Expected Behavior

Because the agent’s diameter is 4, the computed path should not lead it through a gap too small for it to fit through.


Actual Behavior

The computed path tries to lead an agent through a gap that is too small for it to fit through, or calculates a completely invalid path, depending on the agent’s radius and the obstacles in the way.

Here is an example with an agent radius of 10:

Other Observations
When a goal is completely or partially enclosed, the path calculates correctly.

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly

5 Likes

Did some more testing, here’s a circumstance where, given an agent radius of 2 and a gap 4 studs wide, a valid path should be able to be computed, but isn’t.

1 Like

Hi, Thanks for reporting this. This is a known issue and we are working on a fix that improves overall pathfinding results. It will be out soon

6 Likes