Game Cameras: Follow, Lookahead and Shake
The camera decides what players can see and therefore what they can react to. Here are the follow, deadzone and lookahead techniques that make it invisible.

Key takeaways
- A good camera is unnoticed: it shows what is ahead, stays calm when the player makes small moves and never hides threats.
- Combine a deadzone, smoothed follow and lookahead in the direction of movement; in platformers, only move vertically when the player lands.
- In 3D, handle walls and collision, keep the player off center, and let players control the camera when you cannot predict what they need.
- Shake and zoom are feedback tools: brief, proportional and always optional.
A good game camera keeps the player character in view while showing as much as possible of what is coming, and moves so smoothly that nobody notices it. The core techniques are a deadzone (a box the player can move in without the camera following), smoothed following (the camera eases toward its target instead of snapping), and lookahead (offsetting the view in the direction of movement). Add platform snapping for side-scrollers, collision handling for 3D, and short, optional screen shake for impacts.
What the camera is for
The camera is a gameplay system, not just a viewpoint. It decides what the player can see, and therefore what they can react to. A camera that centers the player rigidly wastes half the screen on where they have already been. A camera that jitters with every small movement causes fatigue, and in 3D can cause motion sickness. A camera that lags too far behind shows threats too late. An influential talk by a platformer designer on 2D cameras catalogued dozens of techniques from classic games; most come down to a few principles you can apply in any engine.
Following with smoothing
The simplest camera locks to the player's position. It works, but every tiny movement shakes the whole world. Smoothing fixes this: each frame, move the camera a fraction of the way toward its target.
- Exponential smoothing: the camera covers a fixed fraction of the remaining distance per second. Make it frame rate independent by basing the fraction on elapsed time, or the camera feels different at 30 and 120 frames per second.
- Tuning: in 2D games, the camera typically catches up within roughly 0.1 to 0.4 seconds. Slower feels floaty and cinematic; faster feels tight and arcade-like.
- Separate axes: smooth horizontal and vertical movement independently, because they need different behavior (see platform snapping below).
- Pixel art: smooth the real camera position, but round it to whole pixels when drawing, or sprites shimmer. Our pixel art guide covers this.
Deadzones: let small movements be
A deadzone is a rectangle around the screen center. While the player moves inside it, the camera stays still. When they push past its edge, the camera follows. This removes jitter from small movements like turning around or nudging into position. For side-scrollers, a deadzone of about 10 to 20 percent of the screen width works as a starting point, often narrower horizontally than vertically.
Lookahead: show what is coming
Players need to see where they are going more than where they have been. Lookahead shifts the camera target ahead of the player in the direction of movement:
- Directional offset: when moving right, place the player around a third of the way from the left edge.
- Velocity-based: scale the offset by speed, so fast movement shows more ahead, and standing still recenters.
- Smooth direction changes: when the player turns around, ease the offset to the other side over 0.5 to 1 second. Instantly flipping the offset whips the camera across the screen.
- Aim-based: in shooters, shift the camera toward the aim direction or the cursor, so players see what they are shooting at.
Vertical movement in platformers
If the camera follows every jump vertically, the world bobs up and down constantly. Classic platformers solve this with platform snapping: the camera ignores vertical movement during jumps and only moves vertically when the player lands on a platform at a new height. Two exceptions keep it safe:
- If the player falls below a line near the bottom of the screen, the camera follows immediately so they can see where they will land.
- If the player climbs above a line near the top, the camera follows so they do not leave the screen.
Also give more room below the player than above when falling is dangerous, and more above when the level climbs. Our level design basics explain why seeing the landing spot matters for fairness. The platformer guide gives jump numbers to tune the camera around.
Framing, bounds and points of interest
- Level bounds: clamp the camera to the edges of the level, so players never see empty space beyond the art.
- Rooms and zones: lock the camera inside a room (common in dungeon games) or to a fixed frame for boss arenas, and transition smoothly between rooms.
- Points of interest: pull the camera partway toward important things nearby, like a door, a boss or an objective, then let it go.
- Multiple players: frame all players by targeting their average position and zooming out to fit them, with a maximum zoom out after which you split the screen or pull lagging players along.
3D cameras: the extra problems
A third-person 3D camera has everything above, plus the third dimension:
- Collision: cast a ray or sphere from the player to the camera; if a wall is in between, pull the camera in front of it. Ease back out when the wall is gone, or the camera pops.
- Offset framing: in action games the player often sits slightly left or right of center (over the shoulder), so the aiming area is clear.
- Player control: let players orbit the camera with the right stick, mouse or a drag. Automatic cameras that rotate behind the player should do so slowly, and never fight the player's input.
- Field of view: wider fields of view (around 70 to 90 degrees vertically in many action games) show more but distort edges. Raise it slightly with speed for a sense of velocity.
- Comfort: avoid sudden rotations, heavy head bob and constant shake, which commonly cause motion sickness. Offer settings for camera sensitivity and inverting axes.
- Shadows as depth cues: a blob shadow under the character helps players judge jumps when the camera angle flattens depth.
Shake and zoom as feedback
Shake belongs to the camera, and it should be layered on top of the follow logic, not replace it: compute the camera's position, then add a temporary offset. Keep shake short, proportional to impact and always optional, and apply it to the world view, not the HUD. A quick zoom (punching in a few percent and easing back) emphasizes big moments, like a boss hit or a level clear. The game feel guide has suggested shake values, and our accessibility basics cover reduced motion settings.
A brief for a platformer camera
Camera values are easiest to tune live. In Startbase, ask for them as dials so they appear in the Engine panel's Settings, then play and adjust:
Rework my 2D platformer camera. Horizontal: a deadzone 15 percent of screen width, lookahead that places the player a third from the trailing edge when moving and eases to the other side over 0.7 s when turning, smoothing that catches up in about 0.2 s, frame rate independent. Vertical: only follow when the player lands on a new height, unless they fall below 70 percent of the screen or rise above 20 percent, then follow immediately. Clamp to level bounds. Lock the camera to the arena during the boss fight. Add trauma-based shake on top, off when reduced motion is on. Make deadzone, lookahead and smoothing Engine panel dials.
Common camera mistakes
- Rigid centering that shows too little ahead.
- Frame rate dependent smoothing that feels different on every device.
- Vertical bobbing on every jump.
- Hidden threats: enemies arriving from off-screen with no warning because the camera framed the wrong way.
- 3D cameras inside walls, or ones that fight the player's stick.
Test the camera with the actual levels, at full speed, on a phone screen. Small screens make every framing choice more important. The games template docs explain the Engine panel where you can tune these values while you play. For cameras in 3D, see how to make a 3D game without coding.
Frequently asked questions
What is a camera deadzone in games?
An area around the center of the screen where the player can move without the camera following. Once the player pushes past its edge, the camera moves. It removes jitter from small movements.
What is camera lookahead?
Offsetting the camera ahead of the player in the direction they are moving or aiming, so more of the screen shows what is coming rather than where they have been.
Why does my platformer camera feel jittery?
Usually because it follows every small movement and every jump. Add a deadzone, smooth the follow in a frame rate independent way, only move vertically when the player lands, and round the drawn position to whole pixels in pixel art games.
How do I stop a 3D camera from going through walls?
Cast a ray or sphere from the player toward the camera each frame and, if it hits something, move the camera in front of the obstacle. Ease it back out when the path is clear so it does not pop.

