Skip to content

Class "Camera"⚓︎

Info

You can get this class by using the following functions:

Example Code
1
local camera = Game():GetRoom():GetCamera()

Functions⚓︎

IsPosVisible ()⚓︎

boolean IsPosVisible ( Vector Pos )⚓︎

Returns if the in-world position is visible to the camera.


SetFocusPosition ()⚓︎

void SetFocusPosition ( Vector Pos )⚓︎

Sets the camera's current focus position, causing it to shift towards the specified position

The camera will only move if the current room size is larger than 1x1. If the room size is 1x1 or smaller, the camera will remain stationary and this function will do nothing.

This function must be called on every game update, otherwise the game will override the camera's position.


SnapToPosition ()⚓︎

void SnapToPosition ( Vector Pos )⚓︎

Sets the camera's position instantly to the specified position.

The camera will only move if the current room size is larger than 1x1. If the room size is 1x1 or smaller, the camera will remain stationary and this function will do nothing.

This function must be called on every game update, otherwise the game will override the camera's position.

Bug

This function seems to only work when Active Camera is off.