What do these pathfinding parameters do?

In the example of this page, the “agentParams” has 7 values in it, but there is no documentation of these anywhere. What do these extra parameters do?


-- 1. First, create a path with the parameter set
local agentParams = {
	AgentRadius = 2.0
	AgentHeight = 5.0
	AgentWalkableClimb = 2.0
	AgentCollisionGroupName = "RedPlayers"
	CollectionWeights = { Bridge = 2.5, Minefield = math.huge }
	MaterialWeights = { Water = 1.5 }
	AgentCanJump = false
}
 
local path = PathfindingService:CreatePath(agentParams)
 
-- 2. Listen to path blocked events
path.Blocked:Connect(OnPathBlocked)
 
-- 3. Compute the path
path:ComputeAsync(humanoidPos, targetPosition)
 
-- 4. When the path is blocked...
function OnPathBlocked(blockedWaypointIdx)
 
    -- Check if the obstacle is further down the path
    if blockedWaypointIdx > currentWaypointIdx then
 
        -- Recompute the path
        path:ComputeAsync(updatedHumanoidPos, targetPosition)
        if path.Status == Enum.PathStatus.Succeess then
 
            -- Retrieve update waypoint list with path:GetWaypoints()
            -- and Continue walking towards target
        else
            -- Error, path not found
        end
    end
end

There is documentation of only 3 of these values. What do the other values do and how to use them?

1 Like

I don’t think they actually do anything due to only 3 being listed on the ROBLOX page. However, I could be wrong. I’ve just never seen the rest of those before.

So a scan of all the strings in the studio exe turns up this list:

AgentCanJump
AgentRadius
AgentHeight

NavigationAgentRadius
NavigationAgentHeight
NavigationAgentWalkableClimb
NavigationAgentJumpDistance
NavigationAgentJumpHeight
NavigationAgentMaxDrop
NavigationAgentCanJump

A search of fast flags turned this up:

FFlagNavigationAgentCanJump
FIntNavigationAgentHeight
FIntNavigationAgentJumpDistance
FIntNavigationAgentJumpHeight
FIntNavigationAgentMaxDrop
FIntNavigationAgentRadius
FIntNavigationAgentWalkableClimb

I found this in the cpp tree that correlates to the GreatePathFunction:

RBX::Reflection::BoundFuncDesc<class RBX::PathfindingService,class std::shared_ptr<class RBX::Instance> cdecl(class std::shared_ptr<class boost::unordered::unordered_map<class std::string,class RBX::Reflection::Variant,struct boost::hash<class std::string >,struct std::equal_to<class std::string >,class std::allocator<struct std::pair<class std::string const ,class RBX::Reflection::Variant> > > const >),1>

I searched the dev forums and it looks looks like roblox has a history of not updating this function, with people have to consistently ask to update it.

I was unable to find anything for:

AgentCollisionGroupName
CollectionWeights
MaterialWeights

I created a post earlier today asking about this. Nobody else knew anything either.