Path
Computes navigation paths and exposes waypoints and obstruction events.
Behavior
Path computes navigation paths and exposes waypoints and obstruction events.
Summary
AutoReplan: booleanWhether the path can automatically request a new route when obstructed.
Progress: numberThe progress of the current path calculation.
The result of the latest path calculation.
CheckOcclusionAsync(start: number): numberChecks the current navigation snapshot for an obstruction.
Compute(start: Vector3, finish: Vector3): PathRequestStarts a path calculation and returns a PathRequest.
ComputeAsync(start: Vector3, finish: Vector3): ()Calculates a path between the supplied world-space endpoints and yields until completion.
GetWaypoints(): { PathWaypoint }Returns the waypoints from the latest path calculation.
Replan(from: Vector3?): PathRequest?Requests a new route, optionally from a new start position.
Fires when a waypoint on the path becomes obstructed.
Fires when a replacement route is calculated.
Fires when a previously obstructed waypoint becomes traversable.
Properties
AutoReplan
Path.AutoReplan: booleanWhether the path can automatically request a new route when obstructed.
Progress
Path.Progress: numberThe progress of the current path calculation.
Status
Path.Status: Enum.PathStatusThe result of the latest path calculation.
Methods
CheckOcclusionAsync
Path:CheckOcclusionAsync(start: number): numberChecks the current navigation snapshot for an obstruction. The start argument is a one-based waypoint index and is clamped to at least 1. The current binding returns a zero-based obstruction index, or -1 when no obstruction is found.
Compute
Path:Compute(start: Vector3, finish: Vector3): PathRequestStarts a path calculation and returns a PathRequest.
ComputeAsync
Calculates a path between the supplied world-space endpoints and yields until completion.
GetWaypoints
Path:GetWaypoints(): { PathWaypoint }Returns the waypoints from the latest path calculation.
Replan
Path:Replan(from: Vector3?): PathRequest?Requests a new route, optionally from a new start position.
Events
Blocked
Path.Blocked: RBXScriptSignalFires when a waypoint on the path becomes obstructed.
Replanned
Path.Replanned: RBXScriptSignalFires when a replacement route is calculated.
Unblocked
Path.Unblocked: RBXScriptSignalFires when a previously obstructed waypoint becomes traversable.
Operators
__index · __tostring · __type