Camera
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
ข้อมูลสรุป
คุณสมบัติ
วิธีการ
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
คุณสมบัติ
Camera Subject
ตัวอย่างโค้ด
หัวข้อกล้อง
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
end
resetCameraSubject()Coordinate Frame
focus
วิธีการ
Get Largest Cutoff Distance
Get Pan Speed
Get Parts Obscuring Target
Get Roll
Get Tilt Speed
Interpolate
Pan Units
Screen Point To Ray
Set Camera Pan Mode
Set Roll
Tilt Units
Viewport Point To Ray
World To Screen Point
World To Viewport Point
Zoom To Extents
ส่งค่ากลับ
()
ตัวอย่างโค้ด
ซูมไปยังขอบเขต
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เหตุการณ์
Interpolation Finished