Clase de motor
Path
*Este contenido se traduce usando la IA (Beta) y puede contener errores. Para ver esta página en inglés, haz clic en aquí.
Resumen
Propiedades
Métodos
CheckOcclusionAsync(start: number):number |
ComputeAsync(start: Vector3,finish: Vector3):() |
Eventos
Blocked(blockedWaypointIdx: number):RBXScriptSignal |
Unblocked(unblockedWaypointIdx: number):RBXScriptSignal |
Referencia API
Propiedades
Métodos
CheckOcclusionAsync
ComputeAsync
GetPointCoordinates
GetWaypoints
Devuelve
Muestras de código
Obtener Puntos de Ruta
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
endEventos
Unblocked