Pathfinding Service cannot create Path around Certain Objects if AgentCanJump is False

If we attempt to create a Path using ComputeAsync with the pathParameter of “AgentCanJump” set to false, it will always fail to create a path if the destination is next to an obstacle that the Agent would ordinarily be allowed to jump over.

Note that, if the part that the agent would ordinarily jump over is scaled such that the Agent could not jump over it, or that part’s material is blacklisted by the Costs parameter (it cannot simply have a high cost - it must be blacklisted using math.huge), the Pathfinding Service will be able to compute a path (even if the destination part is the blacklisted material itself)

This issue occurs even with PathfindingUseImprovedSearch Enabled. For this Repro file, it is set to Default

Repro Instructions:

  1. Open the Repro file
    DEBUGCannotPathfindAroundJumpableObstacle.rbxl (84.0 KB)
  2. Play the file
  3. Notice that Rig never moves, and Enum.PathStatus.NoPath prints in the output

Alternatively:

  1. Create a part that is large enough to stop a player from walking over it but not large enough to stop them from jumping over it. Anchor this part.
  2. Create another, smaller part adjacent to that large part. This will be the part our Rig will attempt to path to. Anchor this part as well.
  3. Add a Rig on the opposite end of the obstacle from the small part we’ll attempt to path to.
  4. Add a script that uses PathfindingService to create a path from the Rig’s position to the target part’s position, with the pathParam’s AgentCanJump set to false.
  5. Run the game, and notice that the script fails to generate a path.

Video showcasing the bug, and its workarounds, is attached below. Although workarounds exist, they cannot always be implemented as they might interfere with other game features (as is the case in the game I am working on where I first discovered this bug)

System Info: Intel i7-11700F @ 2.50GHz
16.0 GB RAM
NVIDIA GeForce RTX 3060 Ti

Expected behavior

ComputeAsync should be able to find a path around the obstacle

3 Likes