Classe motore
Path
*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.
Sommario
Proprietà
Metodi
CheckOcclusionAsync(start: number):number |
ComputeAsync(start: Vector3,finish: Vector3):() |
Eventi
Blocked(blockedWaypointIdx: number):RBXScriptSignal |
Unblocked(unblockedWaypointIdx: number):RBXScriptSignal |
Riferimento API
Proprietà
Metodi
CheckOcclusionAsync
ComputeAsync
GetPointCoordinates
GetWaypoints
Restituzioni
Campioni di codice
Ottieni Waypoints del Percorso
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
endEventi
Unblocked