Camera
*Nội dung này được dịch bằng AI (Beta) và có thể có lỗi. Để xem trang này bằng tiếng Anh, hãy nhấp vào đây.
Tóm tắt
Thuộc Tính
Phương Pháp
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):() |
Sự Kiện
Thành viên kế thừa
4 thành viên kế thừa từ PVInstance
58 thành viên kế thừa từ Instance
6 thành viên kế thừa từ Object
Được kế thừa bởi
Tài Liệu Tham Khảo API
Thuộc Tính
Camera Subject
Mẫu mã
Đối tượng Camera
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
Phương Pháp
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
Lợi Nhuận
()
Mẫu mã
Phóng To Kích Thước
local camera = workspace.CurrentCamera
local model = workspace:FindFirstChild("MyModel")
if model then
local modelCFrame = model:GetModelCFrame()
local extentsSize = model:GetExtentsSize()
camera:ZoomToExtents(modelCFrame, extentsSize)
endSự Kiện
Interpolation Finished