CameraState

Back to reference

Data container for the state of a camera.

Members

Functions

Returns Functions Description
CameraState CameraState.new ( camera = nil ) Builds a new camera stack

Fields

Fields Type Description
FieldOfView number Current FieldOfView
CFrame CFrame Current CFrame
Position Vector3 Current Position
Quaternion Quaterion Quaternion representation of the rotation of the CameraState

Metamethods

Metamethods Description
__add ( CameraState other ) Adds two camera states together
__sub ( CameraState other ) Subtract the camera state from another
__unm ( ) Inverts camera state
__mul ( number other ) Multiply camera state by percent effect

Methods

Returns Methods Description
nil Set ( Camera camera ) Set another camera state.

Functions Descriptions

CameraState CameraState.new ( camera = nil )

Builds a new camera stack

Parameters

  • camera = nil

Returns

Fields Descriptions

number CameraState.FieldOfView

Current FieldOfView

CFrame CameraState.CFrame

Current CFrame

Vector3 CameraState.Position

Current Position

Quaterion CameraState.Quaternion

Quaternion representation of the rotation of the CameraState

Metamethods Descriptions

CameraState:__add ( CameraState other )

Adds two camera states together

Parameters

CameraState:__sub ( CameraState other )

Subtract the camera state from another

Parameters

CameraState:__unm ( )

Inverts camera state

CameraState:__mul ( number other )

Multiply camera state by percent effect

Parameters

Methods Descriptions

nil CameraState:Set ( Camera camera )

Set another camera state. Typically used to set Workspace.CurrentCamera's state to match this camera's state

Parameters

  • Camera camera: A CameraState to set, also accepts a Roblox Camera

Returns