No Jumping in Pathfinding

So, I’m building a game with DermonDarble and we are using the pathfinding, but I am starting to get quite annoyed at the fact that roblox pathfinding thinks that NPCs can jump even though we sometimes don’t want them to. It would be really nice if there was a way to let the algorithm know that the NPC can’t jump so that it can account for that because right now it looks weird to have them walk up to the railing near the bottom of some stairs thinking they can just jump the railing instead of going to the bottom of the stairs and walking up them :confused:

1 Like

Make a part that’s cancollide false that covers the entire pathfinding area you don’t want searched while you pathfind (in this case it seems like Y = (math.floor(Torso.Position.Y*4)/4)+4. Remove it when you’re done pathfinding and you’re all set.

I think that might cause them to get stuck when they’re trying to get up stairs, since it would get in the way of them detecting the path up to the top. Best approach for now might be just to manually set up those invisible parts around the bottom parts of stairs, toggling those in and out of the workspace when necessary.
But yeah, Roblox’s pathfinding can be kind of wonky in certain cases.

um, pathfinding ignores non-cancollide parts and NPCs go through them.

I asked for new pathfinding features a few months ago at RDC Europe. The answer I got was along the lines of “we could add these things” (I was specifially asking for pathfinding through air and over gaps). I really hope the pathfinding service gets updated sometime soon, because the idea of the service is great, but it’s really lacking in features to use it effectively.

1 Like

Being able to jump gaps and limit jumping in general would be the epitome of amazing.

1 Like

(This hasn’t been tested)

You could throw together a hacky solution - just put an invisible CanCollide = true part where the jump should occur, then when the AI comes to the edge, have a trigger part to make the AI jump while moving to the next node.