Pathfinding Plus is a Wally package for Roblox developers who want a more reliable pathfinding layer than raw PathfindingService calls.
It ships three layers:
Plannerfor path computation and normalized resultsNavigatorfor single-humanoid movement, cancellation, stuck detection, and replansCoordinatorfor shared compute budgeting, staggered replans, and lightweight crowd spacing
Add the package to your wally.toml:
[dependencies]
PathfindingPlus = "nsawill1405/pathfinding-plus@0.1.0"Then install:
wally installRequire it from your game:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage:WaitForChild("Packages")
local PathfindingPlus = require(Packages:WaitForChild("PathfindingPlus"))local PathfindingPlus = require(game.ReplicatedStorage.Packages.PathfindingPlus)
local navigator = PathfindingPlus.Navigator.new(workspace.NPC, {
plannerConfig = {
agentParameters = {
AgentRadius = 2,
AgentHeight = 5,
AgentCanJump = true,
WaypointSpacing = 4,
},
},
maxReplans = 5,
moveTimeout = 2.5,
})
navigator.Failed:Connect(function(_agent, reason)
warn("navigation failed", reason)
end)
navigator:MoveTo(workspace.Target)local navigator = PathfindingPlus.Navigator.new(workspace.NPC, {
moveTimeout = 3,
})
navigator:MoveTo(workspace.MovingTarget, {
followMovingGoal = true,
movingGoalThreshold = 5,
movingGoalRepathInterval = 0.4,
})local PathfindingPlus = require(game.ReplicatedStorage.Packages.PathfindingPlus)
local coordinator = PathfindingPlus.Coordinator.new({
maxRequestsPerSecond = 12,
perNavigatorCooldown = 0.2,
})
coordinator:SetTargetSpacing(workspace.CrowdGoal, 10, 8)
for _, npc in ipairs(workspace.CrowdNPCs:GetChildren()) do
local navigator = PathfindingPlus.Navigator.new(npc, {
coordinator = coordinator,
maxReplans = 6,
})
navigator:MoveTo(workspace.CrowdGoal)
endPlanner.new(config?)planner:Compute(startPosition: Vector3, goal, requestOptions?) -> PlanResult
PlanResult returns:
okstatuswaypointscostcomputeTimeMsblockedLabelsfailureReason
Navigator.new(agentModel: Model, options?)navigator:MoveTo(goal, moveOptions?)navigator:Cancel(reason?)navigator:Destroy()navigator:GetState()navigator:GetDebugSnapshot()
Signals:
StartedPathComputedWaypointAdvancedReplannedBlockedStuckCompletedFailedCancelled
Coordinator.new(options?)coordinator:Register(navigator)coordinator:Unregister(navigator)coordinator:RequestRepath(navigator, reason?)coordinator:SetTargetSpacing(key, radius, slotCount?)coordinator:Destroy()
maxRequestsPerSecondlimits total path computations through a shared coordinator.perNavigatorCooldownstops one agent from monopolizing the queue.moveTimeoutandmaxReplanscontrol how aggressively a navigator recovers from getting stuck.followMovingGoalmakes a navigator periodically re-evaluate a movingBasePartorAttachmenttarget.movingGoalThresholdis the target drift in studs before a moving-goal replan is requested.movingGoalRepathIntervalis the minimum time between moving-goal replans.SetTargetSpacingonly affects explicit spacing keys orBasePart/Attachmentgoals. RawVector3goals needmoveOptions.spacingKey.
MoveTois non-yielding.- Starting a new
MoveTocancels the old run with reasonReplaced. - Blocked paths only trigger replans for waypoints ahead of the current waypoint.
- Crowd support in v1 is coordination-first: shared budgets, staggered repaths, and spacing slots.
- Steering-based local avoidance between moving agents
- Full crowd simulation
- Non-humanoid movement controllers
The root default.project.json syncs a demo place that mounts:
- the package under
ReplicatedStorage.Packages.PathfindingPlus - example scripts under
ServerScriptService.PathfindingPlusExample
The demo script builds three scenes:
- a single-agent corridor
- a blocked-path replan demo
- a crowd chokepoint demo
Install the local toolchain:
aftman install --no-trust-checkRun checks:
stylua --check src test example
selene src test example
lune run test/run.luau
wally install
wally package --list
rojo build default.project.json --output PathfindingPlus.rbxlx