Unity Playmaker 2D Platformer - Cinemachine Virtual Camera
In this Unity Playmaker 2D Platformer - Cinemachine 2D Virtual Camera tutorial, I'll cover the basic setup of the Unity Cinemachine 2D camera system. This will allow you to easily modify the camera to allow look ahead, player smooth follow, setting up a dead zone, and much more. (to Join my discor
A 2D platformer with a fixed camera feels broken the moment your character walks off the edge of the screen. Cinemachine solves this with a virtual camera that follows the player, and its settings give you far more control over the feel of that follow than a hand-written script would. This guide covers a basic 2D setup and the settings worth tuning.
Step 1 — Install Cinemachine and create the camera Open Window, Package Manager and install Cinemachine. Once installed, a Cinemachine menu appears in the menu bar. Choose Create 2D Camera and a virtual camera game object drops into the scene. This doesn't replace your main camera — it drives it.
Step 2 — Set the follow target In the virtual camera component, drag your player into the Follow Target field. The camera immediately snaps over the player in the scene view. While you're here, adjust the orthographic size under Lens to frame the shot the way you want; you can scale the view in or out without touching the main camera. Press play and the camera already tracks the player with a bit of built-in smoothing.
Step 3 — Add look-ahead Look Ahead Time pushes the camera in the direction the player is moving so they can see what's coming rather than what they've already passed. Set it to 0.5 as a starting point. Look Ahead Smoothing runs from 0 to 30 and controls how gently the camera anticipates — 10 is a reasonable middle. There's also Look Ahead Ignore Y, which restricts anticipation to the horizontal axis. Leave it off and the camera will also lead upward when the player jumps, which may or may not be what you want. Test both and pick what reads better for your game.
Step 4 — Tune damping Damping controls how quickly the camera reacts to player movement. Drop it to zero and the camera becomes snappy, locked tightly to the character with no lag at all. Raise it and the camera trails slightly behind, producing a softer, weightier feel. Neither is correct in the abstract — a fast action platformer usually wants low damping, a slower exploration game benefits from higher values.
Step 5 — Offset the player in frame Screen X and Screen Y move where the player sits within the camera view. If your character shouldn't be dead center — for example, pushed lower in frame so the player can see more of what's above them — adjust these two values rather than moving the camera itself.
Step 6 — Set up a dead zone The dead zone is the region of the screen where player movement produces no camera movement at all. Open the dead zone width and you'll see two vertical lines appear in the game view marking the boundary; the height setting adds horizontal lines. Inside that blue region the camera stays put, and only when the player reaches its edge does the camera start following again. This is a big deal for feel: without a dead zone, every small hop or step nudges the camera and the shot never settles. With one, small movements are absorbed and the camera only responds to meaningful travel.
All of these settings interact, so tune them together and with the game running. Look-ahead, damping, and dead zone size in particular need to be balanced against each other and against your character's movement speed. Get them right and the camera stops being something the player notices.





