Skip to content
Dmitro Szewczuk edited this page Aug 13, 2017 · 2 revisions

Camera is the table wich contains methods to control Camera that can move, rotate, scale.

-- Moving the camera.
camera.move(vec2.new(10, 0))

-- Rotating the Camera.
camera.rotate(10)

-- Setting the up-right corner of camera in desired position.
camera.setPosition(vec2.new(10, 10))

-- Setting width and height of the camera.
camera.setSize(vec2.new(800, 600))

-- Setting rotation angle of Camera.
camera.setRotation(90)

-- Getting able to store camera position.
cameraPosition = camera.getPosition()

-- Getting able to store camera size.
cameraSize = camera.getSize()

-- Getting able to store camera rotation angle.
cameraRotationAngle = camera.getRotationAngle()
Clone this wiki locally