Classe motore
Camera
*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.
Sommario
Proprietà
ViewportSize:ScreenSafeInsetsModel |
Metodi
GetLargestCutoffDistance(ignoreList: Instances):number |
GetPartsObscuringTarget(castPoints: {any},ignoreList: Instances):Instances |
Interpolate(endPos: CFrame,endFocus: CFrame,duration: number):() |
ScreenPointToRay(x: number,y: number,depth: number):Ray |
SetCameraPanMode(mode: Enum.CameraPanMode):() |
ViewportPointToRay(x: number,y: number,depth: number):Ray |
WorldToScreenPoint(worldPoint: Vector3):Tuple |
WorldToViewportPoint(worldPoint: Vector3):Tuple |
ZoomToExtents(boundingBoxCFrame: CFrame,boundingBoxSize: Vector3):() |
Eventi
Membri ereditati
Membri ereditati da PVInstance: 4
Membri ereditati da Instance: 58
Membri ereditati da Object: 6
Riferimento API
Proprietà
CameraSubject
Campioni di codice
Soggetto della Telecamera
local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
local camera = workspace.CurrentCamera
local function resetCameraSubject()
if camera and localPlayer.Character then
local humanoid = localPlayer.Character:FindFirstChildWhichIsA("Humanoid")
if humanoid then
camera.CameraSubject = humanoid
end
end
endCoordinateFrame
focus
ViewportSize
Camera.ViewportSize:ScreenSafeInsetsModel
Metodi
GetLargestCutoffDistance
GetPanSpeed
GetPartsObscuringTarget
GetRoll
GetTiltSpeed
Interpolate
PanUnits
ScreenPointToRay
SetCameraPanMode
SetRoll
TiltUnits
ViewportPointToRay
WorldToScreenPoint
WorldToViewportPoint
ZoomToExtents
Restituzioni
()
Campioni di codice
Zoom Per Estensioni
local camera = workspace.CurrentCamera
local model = workspace:FindFirstChild("MyModel")
if model then
local modelCFrame = model:GetModelCFrame()
local extentsSize = model:GetExtentsSize()
camera:ZoomToExtents(modelCFrame, extentsSize)
endEventi
InterpolationFinished