Camera
概要
プロパティ
方法
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):() |
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