PathfindingService¶
Used to find logical paths between two points.
Partially implemented
Legacy ComputeRawPathAsync/ComputeSmoothPathAsync are present; the modern CreatePath/Path API is not.
Description¶
PathfindingService is used to find logical paths between two points,
ensuring that characters can move between the points without running into
walls or other obstacles. By default, the shortest path is calculated, but you
can implement pathfinding modifiers to compute smarter paths across various
materials, around defined regions, or through obstacles.
See Pathfinding for details on implementing character pathfinding.
Inheritance¶
Object → Instance → PathfindingService
Nova inheritance: Instance → PathfindingService
Properties¶
EmptyCutoff Supported Property Deprecated Sets the percent of a voxel has to be occupied to be considered empty. Defaults to 0.16.
This function worked with the legacy pathfinding system. The pathfinding system currently uses a navigation grid and the EmptyCutoff is unused.
When the PathfindingService computes a path using PathfindingService.ComputeRawPathAsync() or PathfindingService.ComputeRawPathAsync() it uses the voxel representation of the world. A voxel is one cube in a grid overlaid on the world. In this case the voxels being used are 4x4x4. This property sets the percent of a voxel has to be occupied to be considered empty. Defaults to 0.16.
Methods¶
ComputeRawPathAsync Supported Function Deprecated Computes and returns a Path between two Vector3s. If the given MaxDistance is greater than 512, an error will be thrown. (MaxDistance is too large).
ComputeSmoothPathAsync Supported Function Deprecated Computes and returns a smooth Path between two Vector3s.
PathfindingService:ComputeSmoothPathAsync(Vector3 start, Vector3 finish, float maxDistance): Instance
This function computes and returns a smooth Path between two Vector3s. This function fulfills the same purpose as PathfindingService.ComputeRawPathAsync(), but creates a much smoother path for an NPC to follow in comparison.
Roblox reference signature
Inherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
2 modern Roblox member(s) are not implemented yet — expand to inspect
Members declared by Roblox's PathfindingService class (or by a missing base class) that Nova does not expose. Use this list to scope a migration; the compatibility guide has the recommended workaround.
Methods¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
CreatePath |
PathfindingService:CreatePath(agentParameters: Dictionary = nil): Path |
Not yet | Creates a Path object based on the given agent parameters. | — |
FindPathAsync |
PathfindingService:FindPathAsync(start: Vector3, finish: Vector3): Path |
Not yet | Finds a Path between the two provided points. | Yields |
Roblox reference: PathfindingService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.