Pathfinding computes too small of a radius around points

Reproduction Steps

1. Create a path thats (seemingly) the only accessible way through an area outside of the navmesh detection.
2. when computing and during the debug you’ll see that the navmesh area that’s generated is in a straight line towards the goal
3. this will indirectly cause any potential path that is, logically, available to be marked as unavailable as it’s not within the given reach of the pre-computed navmesh of said path.

reproduction within the file:

  1. keep the pillar on the right and it will error
  2. move the pillar all the way to the left and it will compute (no error + navmesh path shown)

Direct links: N/A
System Info: N/A
Reproduction files: Bug.rbxl (102.2 KB)


Expected Behavior

I expect the entire navmesh for terrain to be available during runtime as it makes it extremely difficult for AI to traverse large maps due to these limitations or to be given an furthest as possible path to move towards and compute from there.

Actual Behavior

The computation returns a NoPath not even providing a potential furthest point to compute again from in order to proceed to the next points, if possible at all.

Workaround

the only work around possible is creating a custom pathfinding system which is not entirely worth investing time into if roblox’s functions properly on its own.

Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-09-12 20:09:00 (+02:00)

1 Like

Thanks for the report! We’ll take a look.

1 Like

I don’t wish to bump the thread however I’d like to know if there’s anything more known about this?

1 Like

Hi @VoidedBlades ,
Just to put the summary of what is happening here

Pathfinding service restrict the search to certain extent for performance reasons.

In this case the only path is to go through the cliff on the left side but since it is beyond the extend of search we dont generate the path. One option to get a path in this case to call findPath on a point to the left so that we generate navmesh and then again call the findPath with the actual start and end. This make sure pathfinding has the navmesh generated and it can generate the path. With new opt-in improvements, first call should return partial path and then second call should return the full path. Example below .

Please note in the example below i did not use partial path option. I used the legacy algorithm.

Initially NO path

Generate a temp path so we cache the navmesh.

Please let us know if this solves the problem

Then making the actual call