PathfindingService Generates Path Starting On Opposite Side of the Wall from the Origin

Description

PathfindingService will sometimes generate paths which begin or end on the opposite side of a wall relative to the given origin and target points. This problem is particularly noticeable when navigating near staircases and slopes adjacent to walls.


NavMeshIssueExamples.rbxl (56.6 KB)

Thanks for reporting this. It seems it is not able to generate navmesg on the stairs (in this case) causing this problem. We will investigate

It seems the side wall is causing some problem with navmesh. I removed it and re-generated the path aagin , this time it worked as expected

image

2 Likes

The navmesh generates well underneath the stairs.

I think the pathfinding path computation just finds the points on the nav mesh closest to the input origin and target points, which just so happen to be on the other side of the wall.

Sorry I just edited my response to be clear . While i was typing i saw you responded as well :slight_smile: . If you see the image you shared , you can see the stairs are not colored blue completely which points to issue with navmesh generated .

Yeah we’ve definitely figured out how to fudge the stairs into working by leaving a gap at the floor of the wall at the top of the stairs.

But I feel like this is not intentional behavior.

Are there any nice tips we can try or settings we can fiddle with to improve the accuracy of the nav mesh?

Yes, this is not an intentional behaviour. Unfortunately we currently dont have any settings you can fiddle with to improve the navmesh accuracy. The only way is to move the parts which you are already figured out.

We will investigate this issue though to see what is going on.