Pathfinding Incorrect Behaviour

Bugs/Incorrect behaviour:

  1. AgentRadius is often ignored - waypoints can end up directly beside obstacles even though the AgentRadius (default or specified) should have prevented that. Unlike bug 4, this is not always labelled as “blocked”.
  2. Often the path is clearly not optimal - it’s as if nearby obstacles act as a magnet.
  3. In a path with jumps, the .Blocked event stops working for any obstacles before the final jump waypoint.
  4. Paths can be created that go through obstacles, such that calling path:CheckOcclusionAsync(1) will return something other than -1 despite nothing in the workspace changing. This often happens if no path should have been found due to the agent not having sufficient size to fit.
  5. The default AgentRadius appears to be 1, not 2 (also reported in Jan 2020: Pathfinding AgentRadius is wrong and/or default parameters are documented wrong)

Happens in Roblox Studio and online* with 100% consistency in the sample place. [*I didn’t test each bug online but what I did test was consistent between online and studio.]

Recreation place: Pathfinding Bugs.rbxl (29.2 KB)

Using the recreation place:

  • The first line of workspace.Script can be configured to browse 6 different scenarios (the first five correspond to the bugs as listed above). The script has additional details about what each scenario is demonstrating.
  • Run the place. In all scenarios, the path goes from part A to part B (the black waypoints are near the beginning, the white ones are near the end). Waypoints are taller if their Action is Jump. A waypoint is changed to red if the Blocked event fires for it or if CheckOcclusionAsync returns something other than -1 when the path is created.

(I’m reporting these all together as they seem related.)

3 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

1 Like

It’s been a while and number 1 still happens. Will it get fixed or is it not fixable?