PathfindingService doesn't always use agent params; makes service unusable for large characters

Edit: For those wondering, this is still not fixed as of September 2023.

Pathfinding Service will occasionally generate a path that is unable to be followed by larger characters. This is due to a waypoint being too close to an object, preventing wider characters from reaching said waypoint.

Showing the character attempting, but failing to reach the generated waypoint; they idle there until “.MoveToFinished:Wait()” times out

This issue occurs in both studio & live servers. I’ve witnessed this issue for a few weeks as I have only recently began debugging these issues, although it seems others have had this and similar issues in the past as well.

This ‘unfollowable path’ seems to only generate when there is an unobstructed path between the start and the finish

Showing that nothing is blocking the path

I am using PathfindingService:CreatePath and ComputeAsync with the proper Agent Parameters; I have already adjusted AgentRadius. This issue occurs 100% of the time.

The expected behavior is a path generated far enough from a wall where the character doesn’t try walk right up against it & get stuck due to being too wide. This expected behavior is currently only achieved when an obstacle is between the start and finish.

Expected behavior pictures

Showing the expected distance from all obstacles

Showing an object is between the start and finish

Reproduction Steps:

  1. Create a wide character, I’ve personally tested it with HRP sizes “5.6, 6, 3” and “14, 14, 7”.
  2. Using the code from the pathfinding wiki page, make your wide character follow a path with a part close to, but not blocking the path.

Here’s a simple place that shows the bug in action; just click Play: Critical pathfinding bug.rbxl (45.6 KB)

14 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.

3 Likes

I am facing the same issue. Does anyone have a workaround until this is resolved?

A hacky solution I came up with was allowing the pathfinding character to pass through obstacles using collision groups and teleporting them to the final goal position if they aren’t close enough after the waypoints run out, although these two workarounds only work situationally and are nowhere near the desired effect

1 Like

I’m having this exact issue too!

2 Likes

A potential workaround could be to check if there’s anything near/colliding with the waypoint, and if so, manually change the moveto point to avoid the collision. This is likely the solution I’m going to use, though I’m very confused as to why this is still an issue, as it’s very game-breaking on an otherwise very nice pathfinding system. So much work roblox put into pathfinding only to let it be basically useless.

1 Like

Please do update us if your workaround ends up being successful. I have thought about cheap ways of doing so, and the best I’ve come up with is a GetPartBoundsInBox check followed up with a Raycast to see how close the waypoint is to the collision spot.

Although I don’t usually complain about any Roblox team since they work hard to deliver good a experience for us, support for climbing trusses and pathfinding links was introduced before a fix for this critical bug. Perhaps the priority of this report should be bumped up a bit.

3 Likes

This is likely similar to how I’m going to do it, but I believe It’d be better to use a part like a sphere and GetPartsInPart - getting Bounds would mean large shaped meshes with big bounding boxes would trigger unnecessary avoidance, and only GetPartsInPart uses actual geometry collision.

That being said, using a real part makes it even more a pain in the butt of a workaround.

1 Like

This is an issue that need to be addressed. If Roblox is trying to deter people away from programming their own pathfinding, this bug must be squashed.

1 Like

Still having this issue, this really sucks :frowning:

2 Likes

Was hoping to make a simple pathfinding system, but will have to use A* now. Why has this not been fixed?

3 Likes

Bumping. This seems to be the exact issue for me as well.

PathfindingService worked great for the past few months, but suddenly it no longer computes a proper path, even though it says that it does.

Seems to be fully disregarding the specified agent parameters.

Leave it to Roblox to sweep critical unnecessary bugs under the rug.

3 Likes

May we please have some transparency from Roblox as to why this issue has gone ignored for 2 years? This is not a niche bug that impacts a few small games. I see this issue occur frequently in various front page games and am even able to break some of them just from walking near a corner.