Skip to main content

Camera

The camera module controls what part of the scene is visible on screen. It can follow actors, scroll to specific positions, shake, flash, and be configured with deadzones and bounds.

Following an Actor

The most common use of the camera is to follow an actor (typically the player). Use the Camera Follow Actor event to start following, and Camera Stop Follow to detach.

Follow Styles

The camera can follow an actor with different styles. The style adjusts the predefined deadzone setup — you can use Camera Set Deadzone if you don't like any of the presets.

  • Simple — The camera is always centered on the actor.
  • Platformer — The camera has small deadzones on the sides and a bigger one on the top area.
  • Top Down — The camera has a big deadzone on all sides.
  • Screen By Screen — The camera deadzone is the same as the screen, so the camera only moves when the actor reaches the edge.

The best way to understand this is to check the Camera Follow example.

tip

The camera Deadzone is the area where the actor can move without causing the camera to scroll.

Shake and Flash

The camera can produce a shake effect to simulate impacts, explosions, or earthquakes using the Camera Shake event. You can stop it early with Camera Stop Shake.

The Camera Flash event produces a full-screen flash of a chosen color, useful for lightning, damage hits, or transitions.

Scrolling and Position

You can move the camera to an exact position with Camera Set Position (instant) or Camera Scroll To (smooth scroll over time).

Use Camera Set Lerp To to control how smoothly the camera catches up when following an actor. A lower lerp value makes the camera lag behind slightly, creating a more cinematic feel.

Bounds and Offset

By default the camera can scroll across the entire scene. You can restrict its range with Camera Set Bounds to prevent the player from seeing areas outside the playable space, or use Camera Copy Bounds to match another reference.

The Camera Set Offset To event shifts the camera's center point relative to the followed actor. This is useful for look-ahead effects or cut-scene framing.

You can also restrict which axes the camera is allowed to scroll on with Camera Set Allowed Scroll.

Tips

  • For platformer games, use the Platformer follow style and adjust the deadzone to taste.
  • Combine camera shake with a brief pause (using Wait) to add impact to attacks or explosions.
  • When making a cutscene, stop following the actor, scroll to the target, and resume following when done.

See Also