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?
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.