Engine Class
Camera
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
สรุป
คุณสมบัติ
ViewportSize:ScreenSafeInsetsModel |
วิธีการ
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):() |
เหตุการณ์
สมาชิกที่ได้รับทอด
สมาชิก 4 คนที่รับทอดมาจาก PVInstance
สมาชิก 58 คนที่รับทอดมาจาก Instance
สมาชิก 6 คนที่รับทอดมาจาก Object
เอกสารอ้างอิงเกี่ยวกับ API
คุณสมบัติ
CameraSubject
ตัวอย่างโค้ด
หัวข้อกล้อง
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
วิธีการ
GetLargestCutoffDistance
GetPanSpeed
GetPartsObscuringTarget
GetRoll
GetTiltSpeed
Interpolate
PanUnits
ScreenPointToRay
SetCameraPanMode
SetRoll
TiltUnits
ViewportPointToRay
WorldToScreenPoint
WorldToViewportPoint
ZoomToExtents
ส่งค่ากลับ
()
ตัวอย่างโค้ด
ซูมไปยังขอบเขต
local camera = workspace.CurrentCamera
local model = workspace:FindFirstChild("MyModel")
if model then
local modelCFrame = model:GetModelCFrame()
local extentsSize = model:GetExtentsSize()
camera:ZoomToExtents(modelCFrame, extentsSize)
endเหตุการณ์
InterpolationFinished