RBX.lua.Camera (Object)
{{ObjectPage|name=Camera|The Camera Object is now a supported part of the API, and may be changed at any time. As of April 5th, 2012, this article is accurate.
The Camera object defines a view into the 3D game world. In an instance of the game, each client has it's own Camera object associated with it. The Cameras exist only in the clients state residing in the Workspace, and must be operated on by a LocalScript. The Camera can be accessed through the CurrentCamera property of the Workspace.
A camera's state is defined in the following way:
- The CoordinateFrame property, of type CFrame, represents the the position of the camera.
- The Focus property represents the point the camera is looking at. This is currently always set to be directly in front of a character's head by the game engine.
- The CameraType property represents what action the game engine should perform on the Camera every frame.
- The [[FieldOfView] property, a number, represents the angle the user can see out the sides of the Camera.
- An internal roll amount, which can be set by using the SetRoll method. This number (in radians) represents the angle in which the camera is rotated.
As of April 5th, 2012, the Camera object now supports manipulation by scripts. As a result you can now take near-complete control of the Camera using scripts. The view of a camera object can also be rotated to appear up-side-down by using the SetRoll method.
Setting the CoordinateFrame property to a CFrame value that includes math.huge in one axis will not affect the camera, but setting the Focus property as such will cause the camera to show a white screen. One used to be able to do this to lock the camera in place and prevent it from being moved by holding the right mouse button.
See Also