Camera

extends Instance

Class fields

FieldXML typeValue
NamestringCamera
ExplorerOrderstring5
ExplorerImageIndexstring5

Properties

9
CFrame
CoordinateFrame
FieldXML typeValue
NamestringCFrame
summarystringThe current position and rotation of the Camera. For most CameraTypes, the rotation is set such that the CoordinateFrame lookVector is pointing at the Focus.
CameraSubject
Object
FieldXML typeValue
NamestringCameraSubject
summarystringWhere the Camera's focus is. Any rotation of the camera will be about this subject.
CameraType
CameraType
FieldXML typeValue
NamestringCameraType
summarystringDefines how the camera will behave. <a href="http://wiki.roblox.com/index.php/CameraType" target="_blank">More info</a>
CoordinateFrame
CoordinateFrame
FieldXML typeValue
NamestringCoordinateFrame
Deprecatedbooltrue
summarystringThe current position and rotation of the Camera. For most CameraTypes, the rotation is set such that the CoordinateFrame lookVector is pointing at the Focus.
FieldOfView
float
FieldXML typeValue
NamestringFieldOfView
summarystringThe current angle, or width, of what the camera can see. Current acceptable values are from 20 degrees to 80.
Focus
CoordinateFrame
FieldXML typeValue
NamestringFocus
summarystringThe current CoordinateFrame that the camera is looking at. Note: it is not always guaranteed that the camera is always looking here.
HeadLocked
bool
FieldXML typeValue
NamestringHeadLocked
ViewportSize
Vector2
FieldXML typeValue
NamestringViewportSize
summarystringHolds the x,y screen resolution of the viewport the camera is presenting (note: this can differ from the AbsoluteSize property of a full screen gui).
focus
CoordinateFrame
FieldXML typeValue
Namestringfocus

Functions

14
GetPanSpeed
() → float
FieldXML typeValue
NamestringGetPanSpeed
GetRenderCFrame
() → CoordinateFrame
FieldXML typeValue
NamestringGetRenderCFrame
GetRoll
() → float
FieldXML typeValue
NamestringGetRoll
summarystringReturns the camera's current roll. Roll is defined in radians, and is stored as the delta from the camera's y axis default normal vector.
GetTiltSpeed
() → float
FieldXML typeValue
NamestringGetTiltSpeed
Interpolate
(endPos: CoordinateFrame, endFocus: CoordinateFrame, duration: float) → void
FieldXML typeValue
NamestringInterpolate
PanUnits
(units: int) → void
FieldXML typeValue
NamestringPanUnits
ScreenPointToRay
(x: float, y: float, depth: float = …) → Ray
FieldXML typeValue
NamestringScreenPointToRay
summarystringTakes a 2D screen position and produces a Ray object to be used for 3D raycasting. Input is x,y screen coordinates, and a (optional, defaults to 0) z position which sets how far in the camera look vector to start the ray origin.
SetCameraPanMode
(mode: CameraPanMode = …) → void
FieldXML typeValue
NamestringSetCameraPanMode
SetRoll
(rollAngle: float) → void
FieldXML typeValue
NamestringSetRoll
summarystringSets the camera's current roll. Roll is defined in radians, and is stored as the delta from the camera's y axis default normal vector.
TiltUnits
(units: int) → bool
FieldXML typeValue
NamestringTiltUnits
ViewportPointToRay
(x: float, y: float, depth: float = …) → Ray
FieldXML typeValue
NamestringViewportPointToRay
summarystringSame as ScreenPointToRay, except no GUI offsets are taken into account. Useful for things like casting a ray from the middle of the Camera.ViewportSize
WorldToScreenPoint
(worldPoint: Vector3) → Tuple
FieldXML typeValue
NamestringWorldToScreenPoint
summarystringTakes a 3D position in the world and projects it onto x,y coordinates of screen space. Returns two values, first is a Vector3 that has x,y position and z position which is distance from camera (negative if behind camera, positive if in front). Second return value is a boolean indicating if the first argument is an on-screen coordinate.
WorldToViewportPoint
(worldPoint: Vector3) → Tuple
FieldXML typeValue
NamestringWorldToViewportPoint
summarystringSame as WorldToScreenPoint, except no GUI offsets are taken into account.
Zoom
(distance: float) → bool
FieldXML typeValue
NamestringZoom

Events

2
FirstPersonTransition
(entering: bool) → void
FieldXML typeValue
NamestringFirstPersonTransition
InterpolationFinished
() → void
FieldXML typeValue
NamestringInterpolationFinished