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.
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.
This is an awesome change ! My only gripe is that TrussPart still has sizing constraints. Perhaps a Climbable property could be added to BasePart or Part?
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.
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!
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!
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)
--example, would ignore water no matter what
Costs = {
Water = math.huge
}
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.
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.