- 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”.
- Often the path is clearly not optimal - it’s as if nearby obstacles act as a magnet.
- In a path with jumps, the .Blocked event stops working for any obstacles before the final jump waypoint.
- 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.
- 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.Scriptcan 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
Blockedevent 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.)