概要
プロパティ
方法
CheckOcclusionAsync(start: number):number |
ComputeAsync(start: Vector3,finish: Vector3):() |
イベント
Blocked(blockedWaypointIdx: number):RBXScriptSignal |
Unblocked(unblockedWaypointIdx: number):RBXScriptSignal |
APIリファレンス
プロパティ
方法
CheckOcclusionAsync
ComputeAsync
GetPointCoordinates
GetWaypoints
戻り値
コードサンプル
パスのウェイポイントを取得
local PathfindingService = game:GetService("PathfindingService")
local path = PathfindingService:CreatePath()
local PATH_START = Vector3.new(0, 1, 0)
local PATH_END = Vector3.new(100, 1, 25)
path:ComputeAsync(PATH_START, PATH_END)
if path.Status == Enum.PathStatus.Success then
local waypoints = path:GetWaypoints()
for _, waypoint in pairs(waypoints) do
print(waypoint.Position)
end
endイベント
Unblocked