CAMERA
Camera control and movement.
Availability: Client-only
Methods
CAMERA.attach
client
Attach the camera back to follow the player
Signature: action()
GAME.CAMERA.attach();
CAMERA.detach
client
Detach the camera from the player for free camera control
Signature: action()
GAME.CAMERA.detach();
CAMERA.fov
client
Set the camera field of view
Signature: action(num)
Parameters:
| Name | Type | Description |
|---|---|---|
val | num | Field of view in degrees |
GAME.CAMERA.fov(100);
CAMERA.getObj
client
Get the camera 3D object for direct manipulation
Signature: obj action()
Returns: obj - Camera object with id property
obj obj = GAME.CAMERA.getObj();
CAMERA.lookAt
client
Make the camera look at a specific 3D position
Signature: action(num, num, num)
Parameters:
| Name | Type | Description |
|---|---|---|
x | num | Target X position |
y | num | Target Y position |
z | num | Target Z position |
GAME.CAMERA.lookAt(0, 10, 0);
CAMERA.move
client
Move the camera to a specific 3D position
Signature: action(num, num, num)
Parameters:
| Name | Type | Description |
|---|---|---|
x | num | X position |
y | num | Y position |
z | num | Z position |
GAME.CAMERA.move(0, 10, 0);
CAMERA.rotate
client
Rotate the camera to specific angles
Signature: action(num, num, num)
Parameters:
| Name | Type | Description |
|---|---|---|
x | num | X rotation in radians |
y | num | Y rotation in radians |
z | num | Z rotation in radians |
GAME.CAMERA.rotate(0, 10, 0);
CAMERA.shake
client
Apply a shake effect to the camera
Signature: action(num)
Parameters:
| Name | Type | Description |
|---|---|---|
amnt | num | Shake intensity |
GAME.CAMERA.shake(0);