Skip to content

Extended from EventEmitter Camera

This class is included on every scene, it's used to move you around the scene

Properties

UDim2 OffsetPosition

This property serves to move as many pixels as you want the camera to adjust it to a desired position

Vector2 LocalPosition

This property is used to move the camera internally

Vector2 Limits

This property marks the limits to move the camera, for example, if you set Vector2.new(0.5, 0.5) the camera will move only when it reaches the limit

boolean FollowSubject

This property defines if the camera is going to follow the defined subject

string Scene

This is the Scene Id of the camera

number Smoothness

This property defines the smoothness with which the camera will move, it only works in a range between 0 and 1

Character Subject

This property defines the object which is going to follow the camera

Methods

UDim2 GetPosition()

Gets the camera position

void SetPosition(udim2: UDim2)

Sets the camera position

void SetSubject(subject: Character)

Sets the camera subject

void LookTo(object: StaticObject)

Position the camera in a centered location relative to the provided object

Events

There is no events for this class