Path¶
Stores the result of paths created by PathfindingService.CreatePath().
Description¶
Path objects store the result of paths created by
PathfindingService.CreatePath().
Once a Path object is created, you can call
ComputeAsync() with a starting point and ending
point. This will attempt to compute a valid path for a character to move
along, based on default or custom parameters passed to
CreatePath(). If
ComputeAsync() successfully finds a path, the
Path object will have a Status value of
PathStatus.Success. Otherwise the status will be
PathStatus.NoPath which can occur if there are obstacles between the
two points (and no way around) or if the points are inside of solid objects.
In addition to ComputeAsync(), Path objects have
the GetWaypoints() method which returns a list of
waypoints representing the points a character should follow in sequence to get
from the beginning to the end of the path.
Finally, Path objects can be connected to the
Blocked event which will fire if, at any time during the
path's existence, the path is blocked. Note that this can occur behind a
character moving along the path, not just in front of it.
See Pathfinding for details on implementing character pathfinding.
Inheritance¶
Nova inheritance: Instance → Path
Properties¶
Status Supported Property The PathStatus of the generated Path.
Methods¶
CheckOcclusionAsync Supported Function Deprecated Checks if a path is blocked starting at a specific waypoint.
Checks if a path is blocked starting at a specific waypoint.
This function checks if a path is blocked starting at the waypoint indicated by start.
It returns the first waypoint of occlusion if blocked, -1 if not. it
returns an error if start is less than 0 or greater than the number of
waypoints in the Path.
GetPointCoordinates Supported Function Deprecated Returns a table of Path instances.
This function returns a table of Path instances.
Inherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
4 modern Roblox member(s) are not implemented yet — expand to inspect
Members declared by Roblox's Path 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 |
|---|---|---|---|---|
ComputeAsync |
Path:ComputeAsync(start: Vector3, finish: Vector3): null |
Not yet | Computes a Path from a start position to an end position. |
Yields |
GetWaypoints |
Path:GetWaypoints(): Array |
Not yet | Returns an array of points in the path. | — |
Events¶
| Member | Signature | Status | Notes | Flags |
|---|---|---|---|---|
Blocked |
Blocked(blockedWaypointIdx: int) |
Not yet | Fires when the computed path becomes blocked. | — |
Unblocked |
Unblocked(unblockedWaypointIdx: int) |
Not yet | Fires when a computed path that was blocked becomes unblocked. | — |
Roblox reference: Path
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.