Engine Bug: Pathfinding service is arbitrarily inable to path some terrain

Reproduction Steps

The bug occurs any time Pathfinding Service is used. It does not apply to a specific user, game, or group.

System Information: Intel(R) Core™ i5-3470 CPU @ 3.20GHz, 16.0GB DDR3, NVIDIA GeForce GTX 1650

The following file contains both a rig that includes a Pathfinding Service script with some minor configuration, and a small mound of terrain that is unable to be pathed:
Pathfinding Bug Report.rbxl (1.0 MB)

Expected Behavior

The character in my game should travel across the grass on the arch as it is the simplest and fastest way to get to it’s destination (the Yellow Totem Pole)



Actual Behavior

The character awkwardly hugs the steep stone edge of the terrain rather then walking over the grass, shown in the following attachment and link:

Roblox pathfinding bug report - YouTube

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly
Date Last Experienced: 2022-12-05 00:12:00 (-07:00)

4 Likes

As yes, I’m dealing with this, or a very similar bug. It’s making it very difficult to use path finding on terrain. When I attempt to make NPC’s traverse terrain they tend to do zig-zag like movements towards the goal, even on perfectly flat terrain. I have to place parts over my terrain to get NPC’s to traverse it properly. Due to this i’m restricted to making areas NPC’s traverse either really flat or making the terrain out of mesh parts.

1 Like

@APaperDeveloper I can’t reproduce it using the attached place file, the agent is able to find a viable path to the target.

It looks like you are also using custom costs for jumping. Do you still see the problem if you don’t override the default cost values?

1 Like

The problem does still occur using the default settings. Is there any other information I can provide to assist the investigation of the issue?

Edit: enabling the Show Navigation Mesh studio setting shows me this:

1 Like

Yeah, that debug visualization is a bit counterintuitive. The navmesh simplifies the world geometry and will not perfectly match the smooth terrain. But that is a valid result and not the root cause of the bug you reported. If you have a test place that reproduces the “hugging-the-edge” issue, we can look into it.

1 Like

Although the visualization has proven to be unreliable in other scenarios, here it has accurately depicted the issue; the game is not allowing the dummy to navigate to that terrain in my instance of studio. (I can attach a video if needed)

Here is a copy of the terrain where the issue in the video was recorded:
Pathfinding Bug Report 2.rbxl (1.1 MB)

1 Like

I can reproduce it now. We’ll investigate.

3 Likes

Is there any update on this? I have had to delay a feature release for a full month now, even though the feature on my end is already complete. I do not mean to rush, but I am interested in how the investigation is going.

1 Like

We are in february and any news about it?

Please give us update because this is a huge problem for my RPG and NPC

1 Like

We fixed this ourselves but encountered this issue and have been dealing with it for a long time.

The issue with PathfindingService creating terrible paths on smooth terrain has to do with materials, I know that much. Any news on the investigation?

It’s not cost-related either

Here’s what it looks like to generate what (should) be a simple path on smooth terrain across a couple different materials

As you can see it’s terrible and even straight short distance paths will produce zigzags/nonsensical paths if there’s more than one material

Here’s what it should be(after we manually fixed it)

I was going to make my own bug report but figured I’d just bump this instead

Here’s my pathfinder plugin if you want to quickly test PathfindingService in studio

3 Likes

We found a root cause for the zigzagged paths and other path issues. We are not ready to deploy the fix yet, but it does address other issues as well, such as more accurate distance to obstacles and selecting more optimal paths in general. We could enable this on specific places if you want to try it out. If you are interested, message me or @watIsInTheName with your place details.

Unfortunately the fix doesn’t address this original poster’s issue, but we intend to get back to this issue soon. In the meantime, try modifying the terrain to give pathfinding a different terrain configuration and workaround this bug.

@tyridge77 is your post referring to the place referenced in the original post?

btw thank you for implementing and sharing your pathfinder plugin, it’s awesome!

2 Likes