Introducing: Roblox Pathfinding

It’s honestly such a big improvement over the old pathfinding API. It was near-useless for anyone aiming to make sure their NPCs path find properly. Using something like custom tailored A* was a way better solution.

The new API however? the moment I saw that it uses navigation meshes, I was excited and knew this Is what I’m going to use from now on.

4 Likes

1 of 2 things I’ve noticed is that it thinks it can walk over things that are too tall to walk over. R6 characters can walk over a 2 stud height without jumping if you hit it straight on, but this is trying to walk over a 2.2 stud ledge without jumping and it gets stuck. My demo fixes this by telling the character to jump whenever the torso/root part is touched. It’s also pretty unconfident in how high it can jump, concluding that certain places are inaccessible because it won’t try to make the jump that it definitely can make, or it takes the long way around when it could just jump.

6 Likes

woohoo!

Awesome, this will come in super handy for resurrection!

3 Likes

The nav mesh won’t generate jump waypoints if there are already falling waypoints between the two platforms where a jump waypoint can be

9 Likes

Any information on possible customization to the new pathfinding system? It’s awesome that we now have a more accurate and dynamic system - but without customization, there’s a lot of hard-coded constants that some games might want to break away from.

  • Using pathfinding for giant characters / deformed characters (ogres/trolls in RPGs / spiders that are wide but short)
  • Using pathfinding for space-games (high jumppower)
  • Integrating pathfinding with Collision Groups or otherwise differ navmesh depending on the entity to move (in thread link below)

Some features requests related to pathfinding, which would be cool to see for this new system:
https://devforum.roblox.com/t/no-jumping-in-pathfinding/19662
https://devforum.roblox.com/t/navmesh-pathfinding/14944
https://devforum.roblox.com/t/pathfindingservice-woes/47007
https://devforum.roblox.com/t/pathfinding-needs-an-ignore-list-argument/9677

22 Likes

We absolutely want to do more with it now that its out. Hang tight!

12 Likes

Does this work with thin floors, such as the 0.2 thickness floors created by the Terraingle plugin?

2 Likes

We will fix this soon. Thanks for reporting it.

3 Likes

The first step for PF was to release something analogous to the current service, and extend it as the new system gets stable.

Customizing the agent size+jumppower, is something we will be working on soon.

2 Likes

Is this pathfinding going to be updated to work with ladders at some point? I know a ladder is deterministic based on the conditions of whatever parts a player is facing, but perhaps it could work with Trusses at least?

5 Likes

Yes!

8 Likes

This is partially where the portals I suggested in another thread would come in handy. You could use them to define an entry portal at the bottom of the ladder, and an exit portal at the top of the ladder. When the NPC requested to use the portal, you’d just use custom Lua code to make them climb the ladder, and resume pathfinding when they reached the exit portal.

This could also be useful for other features (literal portals where there’s no solvable path otherwise, elevators that can’t be detected by raycasting, human cannons like in Donkey Kong, etc). You define two points and NPCs seamlessly pathfind between them, letting you control how the NPCs move through the portal zone.

8 Likes

With that plugin, the navmesh is correctly generated, but FindPath fails for some reason.

I opened an internal ticket to investigate.

I tried several different thin floors with various bumps and undulations, and the navmesh does not always get generated. And the FindPath does not seem to work.

This tops off the string of incredible updates, you’re holding up to your RDC promises, thanks guys! If you decide to release Even Better updates I think we might just have to celebrate. Improved pathfinding has been a real need for my game specifically. Please do take into consideration the customization @As8D suggested though.

How fast is this compared to before? I tend to prefer legacy at times over A* or Roblox Pathfinding if I am use a multitude of humanoids that may working at once.

I had one running in real-time, and it seemed to be able to solve pretty basic mazes in around 0.1 seconds. Of course, that’s going to be machine-dependent. It seems pretty fast though. Fast enough that you can reanalyze paths on the fly and be fine.

It’s also one of those “async” methods, which means it runs separately from the main game thread (I think?), so you won’t get any lag spikes while it’s finding paths.

2 Likes

OK that doesn’t sound too bad cause Im worried about causing some sort of server lag.

1 Like

This is great thanks.

1 Like