Skip to content
Download

Camera following the player

  1. Select the room and, in the Inspector, increase the Size beyond the game resolution.
  2. Under Camera › Follow, pick the object.

The options (limit to the room, smoothing, dead zone) are in Room camera.

function onSpawn(self)
camera.follow(self)
camera.smoothing = 4
camera.bounded = true
end

stopFollowing() releases the camera; with no target, move it through x and y. shake(force, seconds) shakes the screen.

Reference: Camera.