Cameraクラス
ひとことで言うと
プレイヤーが見ている視点(カメラ)を表すクラスです。LocalScriptから workspace.CurrentCamera で使います。
公式の説明(英語):A class which defines a view of the 3D world.
クラスの関係
受け継いでいるクラス:Object → Instance → PVInstance → Camera
このクラスを受け継ぐクラス:ViewportCamera
プロパティ(17)
| 名前と書き方 | 説明 |
|---|---|
CameraSubjectCamera.CameraSubject: Instance | The Humanoid or BasePart that is the Camera subject. |
CameraTypeCamera.CameraType: CameraType | カメラの動き方の種類。Scriptableにすると、スクリプトで自由に動かせます。Specifies the CameraType to be read by the camera scripts. |
CFrameCamera.CFrame: CFrame | カメラの位置と向き。The CFrame of the Camera, defining its position and orientation in the 3D world. |
DiagonalFieldOfViewCamera.DiagonalFieldOfView: float | Sets the angle of the camera's diagonal field of view. |
FieldOfViewCamera.FieldOfView: float | 視野の広さ(度)。Sets the angle of the camera's vertical field of view. |
FieldOfViewModeCamera.FieldOfViewMode: FieldOfViewMode | Determines the FOV value of the Camera that's invariant under viewport size changes. |
FocusCamera.Focus: CFrame | Sets the area in 3D space that is prioritized by Roblox's graphical systems. |
HeadLockedCamera.HeadLocked: boolean | Toggles whether the camera will automatically track the head motion of a player using a VR device. |
HeadScaleCamera.HeadScale: float | Sets the scale of the user's perspective of the world when using VR. |
MaxAxisFieldOfViewCamera.MaxAxisFieldOfView: float | Sets the angle of the camera's field of view along the longest viewport axis. |
NearPlaneZCamera.NearPlaneZ: float | Describes the negative **Z** offset, in studs, of the camera's near clipping plane. |
OrthographicModeCamera.OrthographicMode: OrthographicMode | Sets which screen axis Class.Camera.OrthographicSize|OrthographicSize is applied to. |
OrthographicSizeCamera.OrthographicSize: float | Sets the extent in studs of the dimension chosen by Class.Camera.OrthographicMode|OrthographicMode. |
ProjectionTypeCamera.ProjectionType: ProjectionType | Chooses between perspective and orthographic cameras. |
ViewportSizeCamera.ViewportSize: Vector2 | The dimensions of the device safe area on a Roblox client. |
ViewStretchCamera.ViewStretch: float | Stretches the axis of the view not pinned by the current Class.Camera.FieldOfViewMode|FieldOfViewMode or Class.Camera.OrthographicMode|OrthographicMode. |
VRTiltAndRollEnabledCamera.VRTiltAndRollEnabled: boolean | Toggles whether to apply tilt and roll from the Class.Camera.CFrame|CFrame property while the player is using a VR device. |
メソッド(7)
| 名前と書き方 | 説明 |
|---|---|
GetPartsObscuringTargetCamera:GetPartsObscuringTarget(castPoints: Array, ignoreList: Instances): Instances | Returns an array of Class.BasePart|BaseParts that are obscuring the lines of sight between the camera's Class.Camera.CFrame|CFrame and the cast points. |
GetRenderCFrameCamera:GetRenderCFrame(): CFrame | Returns the actual CFramewhere the Camera is being rendered, accounting for any roll applied and the impact of VR devices. |
ScreenPointToRayCamera:ScreenPointToRay(x: float, y: float, depth: float): Ray | Creates a unit Ray from a position on the screen (in pixels), at a set depth from the Camera orientated in the camera's direction. Accounts for the GUI inset. |
ViewportPointToRayCamera:ViewportPointToRay(x: float, y: float, depth: float): Ray | Creates a unit Ray from a position on the viewport (in pixels), at a given depth from the Camera, orientated in the camera's direction. Does not account for the Enum.ScreenInsets|CoreUISafeInsets inset. |
WorldToScreenPointCamera:WorldToScreenPoint(worldPoint: Vector3): Tuple | Returns the screen location and depth of a Vector3 worldPoint and whether this point is within the bounds of the screen. Accounts for the GUI inset. |
WorldToViewportPointCamera:WorldToViewportPoint(worldPoint: Vector3): Tuple | Returns the screen location and depth of a Vector3 worldPoint and whether this point is within the bounds of the screen. Does not account for the GUI inset. |
ZoomToExtentsCamera:ZoomToExtents(boundingBoxCFrame: CFrame, boundingBoxSize: Vector3): () | Adjusts the Class.Camera.CFrame|CFrame so that the specified bounding box is fully visible within the camera's viewport. |
受け継いでいるメンバー
PVInstance から受け継いでいるもの(4)
Instance から受け継いでいるもの(46)
Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged
Object から受け継いでいるもの(4)
英語の説明とメンバーの一覧は、Roblox Creator Documentation(Camera)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。