Camera following the player
In the editor
Section titled “In the editor”- Select the room and, in the Inspector, increase the Size beyond the game resolution.
- Under Camera › Follow, pick the object.
The options (limit to the room, smoothing, dead zone) are in Room camera.
In code
Section titled “In code”function onSpawn(self) camera.follow(self) camera.smoothing = 4 camera.bounded = trueendvoid onSpawn() override { scene().camera.follow(handle()); scene().camera.smoothing = 4; scene().camera.bounded = true;}stopFollowing() releases the camera; with no target, move it through x and y. shake(force, seconds) shakes the screen.
Reference: Camera.
