Pathfinding now supports Climbable Trusses

Hello Developers,

We are releasing an enhancement to pathfinding to support truss climbing. Humanoids have been able to automatically climb trusses for some time, but until now we didn’t have support for this behavior in the pathfinding service.

We are adding a new AgentCanClimb parameter in Agent Parameters, which is false by default.

To allow agents to climb trusses, simply set the value to true when creating the NavigationPath to allow the agent to climb the truss. You can also customize the cost during path construction:

local path = PathfindingService:CreatePath { 
    AgentCanClimb = true,
    Costs = {
        Climb = 2 -- The cost of climbing path, the default is 1.0
    }
}

Here is an example:

With the new truss climbing feature, you no longer need to add a PathfindingLink manually for each TrussPart.

Here is the full documentation for further details on pathfinding.

We hope you enjoy using this new capability and would love to answer your questions and hear your feedback below!

Thank you!

240 Likes

This topic was automatically opened after 10 minutes.

Awesome! This should make it much easier to set up climbing AI in my newer maps.

13 Likes

Pretty cool :+1: I will make sure that Pathfinding now supports Climbable Trusses :smiley: :smiley: :smiley:

9 Likes

Finally, another long waited feature is here. Those improvements will definitely make the engine look much better.

6 Likes

Been waiting for this for too long, very glad to see it’s here!

4 Likes

This will make it so we don’t have to create our own Climbing Functions. YAY!!! :partying_face:

3 Likes

I would like a parameter for AgentCanDrop. Currently the only way to allow an agent to drop off a navmesh onto a lower navmesh is to set AgentCanJump to true. But this means the path will also allow jumping up onto a higher navmesh. Sometimes there are cases where your agent should not jump but should be allowed to drop down.

27 Likes

This is an awesome change :slight_smile:! My only gripe is that TrussPart still has sizing constraints. Perhaps a Climbable property could be added to BasePart or Part?

36 Likes

Awesome. It will work with climb-able parts that are not trusses too (parts placed over each other with a little gap between them)?

6 Likes

Great work! Finally some new cool updates to pathfinding!

3 Likes

I tested it and for now it doesn’t work unfortunately, let’s hope it does in future updates

3 Likes

Gonna also ping @TheTravellerChicken1

A good workaround until Roblox fixes this (assuming they will) might be to use invisible TrussParts via BasePart.Transparency = 1.

8 Likes

I am honestly happy with this addition, now I can make them get out of a hole! I wonder if one day you are guys would add a way to pass an IgnoreList/WhiteList to pathfinding.

These are some features I consider are missing or complex to find solutions from a Roblox dev at the current moment (Will not be requesting them right now, just wanted it to through it out here):

(If anyone knows how to execute any of the points below, please give me the solution of it, that is performant and not something crazy like cloning the whole world or setting a collision group to all the parts like some people speculate)

  • I want Pathfinding to ignore everything except terrain (because I want to make my object just move around there) and sometimes I want an object to ignore certain blocks when doing the path as well. I can’t do that now as far as I know. Using Pathfinding Modifiers will not be good for this since I will not be inserting thousands of them when this task must be done.

  • Ability to ignore completely a material so my object never goes through water/lava as well. I don’t want him to be swimming or walking through certain areas that are considered hazardous in the game.

  • Ability to make so if a part that is hazardous will be touching him, he shouldn’t walk to it.

  • Add another kind of path that you give it a goal, the path will be computed but if it cannot reach the goal it will give you all the waypoints to the nearest one to the goal.

6 Likes

THE ONE PIECE IS REAL!

im honestly really happy with this new addition to pathfinding, this is going to make many NPCS and other pathfinding in other games more advanced and more easy to use! No more manual climbing scripts!

4 Likes

Should this have been a future since the service was released? Yes. Am I hyped that it’s here? Yes. I’m excited to see future pathfinding updates to make it better. Good job!

3 Likes

Superb addition! Particularly like that we can set the cost of the climbing action

3 Likes

Very convenient timing, right as I’m making monster AI for my horror game.

4 Likes
  1. I don’t think you can ignore everything except terrain unless you set the cost of every single BasePart material to math.huge (Material | Roblox Creator Documentation) or pathfinding modifiers (which you said you didn’t want to use but if you use a script you could automate it)

  2. You should be able to use pathfinding costs to ignore a material or specified hazardous parts. (PathfindingService | Roblox Creator Documentation)

--example, would ignore water no matter what
Costs = {
    Water = math.huge
}
  1. Not sure exactly what you mean but this but it’s impossible to detect if a script makes a part hazardous unless you have some sort of variable (like a BoolValue or boolean attribute) or pathfinding modifier.
  2. I’m pretty sure pathfinding already tries to find any path and if it can’t reach it then there isn’t a possible way to the goal. You might have to re-compute it.
4 Likes

This should’ve been released way way way way way earlier.

4 Likes