PathfindingService computes invalid paths under specific circumstances when using PathfindingModifiers

Reproduction Steps

1. Create a gap smaller than a path’s agent radius between either 2 pathfinding modifiers, or a pathfinding modifier and a wall.
2. Set the pathfinding modifiers costs to be high, or infinite.
3. Compute the path such that the modifiers are between the start and the goal.

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

Expected Behavior

I would expect that when computing paths, gaps between pathfinding modifier volumes which are smaller than an agent’s diameter should be weighted the same as the modifiers surrounding them, so that paths are computed correctly.


Actual Behavior

The pathfinder will try to compute paths through gaps too small for the agent to fit through. When the cost of modifiers are infinite, these gaps are completely intraversible, and when costs are very high, these gaps are usually less efficient that going down an alternate path.


Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly
Date First Experienced: 2022-09-02 00:09:00 (-06:00)
Date Last Experienced: 2022-09-02 00:09:00 (-06:00)

7 Likes

Can reproduce on latest Studio version.

image

Some other notes of weirdness:

  • In this scenario, making the AgentRadius 5 seemed to fix it for some reason, even though there’s more than enough room for it to walk through the area, and it does if there isn’t a pathfinding modifier there.
  • Even weirder, setting AgentRadius to 3 and 4 does… whatever this is (WaypointSpacing = 1)

, which causes any NPC following this path to walk directly through the “non-traversable” area.

3 Likes

Hi, 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

4 Likes

Thats great to know, excited to see the new improvements, thank you!

1 Like

Any news when this will fixed soon?

1 Like

I know that this is an old report, but it looks like the pathfinding changes mentioned by @watIsInTheName are finally coming together, to the point where they are allowing people to opt-in their games to them with a DM:

@crossStarCross you could probably mark a solution as a fix is incoming.

1 Like

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