Unexpected waypoints repartition when using PathfindingService

I’m currently in the making of some pathfinding script and it works well until we get to the point where the non-player character is suppose to walk through the points in question.

As you can see in the picture below, at the bottom right there’s a big space between two points and that’s causing problems when the zombie have to walk through the points. The endpoint is the red point. First I was using PathfindingService:CreatePath() with default parameters and even after increasing the agentRadius thingy it would still occur.

I’d like to know if anyone has an idea about what could be happening or an interesting solution in order to fix this.

Btw I actually found that it was worse than I was thinking.
image
I tried to increase the wall thickness but as you can see it seems to be some kind of joke at this point.

Uhhhhh. I don’t think Pathfinding work with Extremely Thin walls like the example but I still don’t get your question, is it your tracker didn’t work properly or your pathfinding seem to pathfind through walls

I did two things in order to fix this :

  • Bigger walls
  • Bigger AgentRadius

Right now I tried to set back the agentRadius to normal and it seems to work but we’re never sure. I’m going to watch it straight find points for five minutes and tells you if it’s fixed or not.

So your problem was the pathfinding waypoint seem to pathfind through walls right?

Yea because the walls were apparently too thin. Changing the parameters (increasing the radius) in order to solve this problem just added another problem.

You don’t have to increase agent’s radius, You just gotta increase the wall’s thickness cause look at those Thickness, The Pathfinding System barely able to find an obstacle with that Thin wall, They check the obstacle by find part in region3 this is my theory

1 Like

Just wanted to know how big did you make the walls to fix your problem?

Sorry for the 3 year bump, but I’m posting this for others who come across this post.

You can manipulate PathfindingService using Parts with PathfindingModifiers in them. For example, sometimes the service glitches out and thinks there is something blocking the way when there isn’t. To fix this, you can add Parts as big as the blank spaces in your map, set their CanCollide and CanQuery to false, and add a modifier with the PassThrough property set to true.

Example:
(Before I added this part, the NPC would not walk through that region.)

1 Like