Common Camera Setups
This page walks through complete camera setups for common kinds of games. Each one lists the components you need, where they go and the property values that give the effect, so you can build it from scratch or use it as a starting point. Every property is described in full on the reference pages: Views, Director, Modifiers and Framing.
All setups start from the same base, described once below. Input action names such as Aim or LockOn must exist in the project's input action map and be bound to keys and buttons.
| Setup | Good for |
|---|---|
| The base setup | Every setup on this page. |
| Over-the-shoulder action camera | Third-person shooters and action games. |
| Exploration camera | Adventure and platforming games where the player mostly moves. |
| First-person shooter | First-person games with aiming, leaning and weapon feedback. |
| Melee lock-on | Action games with bosses and duels. |
| Fixed camera per room | Horror and puzzle games with authored camera angles. |
| Side-on rail camera | Corridors, chases and side-scrolling sections. |
| Top-down camera | Strategy, management and twin-stick games. |
| Scripted shot and dialogue | Story beats, reveals and conversations. |
| Explosions and shaking areas | Any game. |
The base setup
The base setup is one Camera Director next to the scene's Main View camera, and one player view on the character. Build it once, then add the pieces each setup lists.
- Add the Gameplay Cameras package to the project in the package manager.
- Create an object named
Camera. Add a Camera component with Usage Hint Main View, then a Camera Director on the same object. - Make sure the player character has a
plInputComponentthat uses the project's input action map. Views and modifiers read their actions through it. - Under the character, create a child object for the player view and add the view the setup asks for.
- Set the director's
DefaultViewto that child object. - Play, and run
Cameras.Debug 1in the console. The player view should be the only request, at priority 10.
Modifiers can go in the director's Modifiers list, where they apply to every view, or in a view's own list, where they apply only while that view is showing. Put effects the player always feels, such as shake, on the director. Put effects that belong to one view, such as head bob on a first-person view, on that view.
Over-the-shoulder action camera
A close third-person camera offset to one side, so the character does not block the crosshair. The player can swap shoulders, aiming pulls the camera in and narrows the view, and shots kick the aim up.
| Where | Component or modifier | Settings |
|---|---|---|
| Player view | Third Person View | TargetOffsetLow (0, 0, 1.3), TargetOffsetHigh (0, 0, 1.6), MaxDistance 2.2, ShoulderOffset 0.5, ShoulderSwapAction SwapShoulder, and LookInput → LookAction set to the look action. |
| Director | Damping | Defaults. Smooths the small jitter of a moving character. |
| Director | Zoom | Action Aim, FovScale 0.65, ArmPull 0.45, LookScale 0.5. |
| Director | Recoil | Defaults. |
| Director | Shake | Defaults, Name Shake. |
- Build the base setup with a Third Person View and the settings above.
- Add the modifiers to the director in the order shown. Order matters within a stage: with Damping first, it smooths the view's movement but not the recoil kick that follows.
- From the weapon script, call
AddRecoil(2.5, 0.3)on the director for each shot. Vary the yaw a little per shot if you want the aim to wander. - Play. Hold the aim button: the camera moves in and the field of view narrows over 0.15 seconds. Press the swap action to move the camera to the other shoulder.
Tuning
- For a tighter feel when aiming, lower
FovScaleto 0.5. To slow the look speed less while aiming, raiseLookScale. - To center the character when not aiming, set
ShoulderOffsetto 0 and change it from script while aiming. Changes ease in.
Exploration camera
A relaxed third-person camera for a game where the player spends most of the time moving. The character can drift inside a dead zone before the camera follows, the camera swings back behind the character when the player stops steering, and it slowly turns toward landmarks nearby.
| Where | Component or modifier | Settings |
|---|---|---|
| Player view | Third Person View | MaxDistance 4.5, AutoRecenter on, RecenterDelay 2.5 s, LookAhead 1.5, PositionLag 0.1 s. |
| Director | Composition | SoloPoint Leading Room, DeadZone (0.12, 0.10), SoftZone 0.55. |
| Director | Look Hint | Speed 6°, IdleTime 2 s. |
| Each landmark | Camera Point Of Interest | ActivationRadius to taste. |
- Build the base setup with a Third Person View and the settings above.
- Add Composition and Look Hint to the director's
Modifierslist. - Add a Camera Point Of Interest to each landmark the camera should drift toward.
- Play and run around. With Leading Room, the character sits on the third of the screen behind its direction of travel, leaving room ahead. Stop steering near a landmark and the camera turns toward it.
Tuning
- Use
SoloPointCenter for a classic centered character. - A bigger
DeadZonemakes the camera calmer, and a smaller one follows more tightly. - While the player steers, Composition follows the camera's new aim instead of pulling the character back to its point. It frames the character again once steering stops.
First-person shooter
A first-person camera at the character's eyes, with head bob while walking, a dip on landing, leaning around corners, aim-down-sights zoom, a wider view while sprinting, and recoil.
| Where | Component or modifier | Settings |
|---|---|---|
| Player view, under the head object | First Person View | LookInput set up for pitch, NearPlane 0.05, MaxPitch 85°. |
| Player view | Head Bob | Defaults, Name HeadBob. |
| Player view | Landing | Defaults. |
| Player view | Lean | LeanLeftAction LeanLeft, LeanRightAction LeanRight, MaxRoll 10°, SideOffset 0.35, CollisionLayer the layer walls are on. |
| Director | Zoom | Action Aim, FovScale 0.6. |
| Director | FOV Kick | SpeedThreshold 5, FullSpeed 8, MaxKick 8. |
| Director | Recoil | Defaults. |
| Director | Shake | Defaults. |
| Director | Focus | Target Crosshair. Only needed with depth of field. |
- Follow Setting up a first-person camera on a character with a head object.
- Add Head Bob, Landing and Lean to the view's own
Modifierslist. - Add Zoom, FOV Kick, Recoil, Shake and Focus to the director's list, in that order.
- From the weapon script, call
AddRecoil(1.5, 0)on the director for each shot. - Play. Walk to see the head bob and jump off a ledge to see the landing dip. Lean next to a wall: the camera tilts but stops moving sideways before it reaches the wall.
Tuning
- Some players feel unwell with head bob. Offer a slider in the options menu and pass its value to
SetModifierWeight("HeadBob", value)on the director while the first-person view is showing. - Head Bob and Landing need a character controller on the subject, so they know when it is in the air. See Landing.
- For VR, leave
AllowInXRoff on rotational effects such as Shake and Lean.
Melee lock-on
The player presses a button to lock onto an enemy. The camera then keeps the player lower left and the enemy center right, and another button switches to the next enemy.
| Where | Component or modifier | Settings |
|---|---|---|
| Player view | Third Person View | MaxDistance 4. |
| Director | Composition | Defaults. Lock-On frames through it. |
| Director | Lock-On | Action LockOn, SwitchAction SwitchTarget, MaxDistance 20, TargetOffset (0, 0, 1.4). |
| Each enemy | Tag | The tag LockOnTarget on an object with a mesh or other rendered component. |
- Build the base setup with a Third Person View.
- Add Composition, then Lock-On, to the director's
Modifierslist. - Give each enemy prefab the
LockOnTargettag. - Play, face an enemy and press the lock-on button. The enemy nearest the center of the screen is picked. Press the button again to release, or move more than 24 meters away (1.2 ×
MaxDistance).
Tuning
- For a large boss, raise
TargetOffsetto its chest or head height. - To lock only while the button is held, turn
Toggleoff. - When the locked enemy's object is deleted, the modifier picks the next target, or releases the lock when there is none.
Fixed camera per room
Each room has its own authored camera angle. Walking into a room cuts or blends to its camera, which turns to keep the player in view. Outside every room the player's own camera returns.
| Where | Component or modifier | Settings |
|---|---|---|
| Player view | Third Person View | Any. Used between rooms. |
| An object per room, at the camera position | Fixed View | Target the player, TargetOffset (0, 0, 1.2), TrackingSmoothing 0.3 s, FieldOfView 50. |
| An object per room, covering the floor | Camera Volume | View the room's Fixed View, HalfExtents the room's size, BlendIn 0, BlendOut 0. |
- Build the base setup.
- For each room, place an object high in a corner, facing into the room, and add a Fixed View.
- Add a Camera Volume that covers the room and set its
Viewto the room's Fixed View. - Play and walk from room to room. With
BlendInandBlendOutat 0 the camera cuts. Raise them for a blend instead.
Tuning
- Let room volumes overlap a little at doorways. They have the same priority, so the newest request wins: the camera switches as soon as the player steps into the next room and stays there until they leave it.
- Turn on
FrameTargetto zoom in when the player is far from the camera, so they keep the same size on screen.FrameSizesets how tall an area is framed. - Leave
Targetempty for a completely static angle.
Side-on rail camera
The camera rides along a track beside a corridor, staying level with the player and looking at them, as in a side-scrolling section or a chase.
| Where | Component or modifier | Settings |
|---|---|---|
| Track object | Spline | A spline parallel to the corridor, a few meters to the side. |
| Rail camera object | Rail View | Spline the track object, Target the player, Mode Closest To Target, RailSmoothing 0.3 s. |
| Corridor | Camera Volume | View the Rail View. |
- Build the base setup.
- Draw a spline beside the corridor at about head height, and add a Rail View that uses it.
- Cover the corridor with a Camera Volume that shows the Rail View.
- Play and run down the corridor. The camera keeps to the point on the track closest to the player.
Tuning
- Set
KeyOffsetto a small value so the camera leads the player and shows more of what is ahead. Whether that is a positive or negative value depends on which way the spline runs. - For a chase that plays out the same way every time, set
Modeto Scripted and move the camera withSetRailKeyfrom a script or sequence.
Use the Rail View through a Camera Director. In standalone mode it moves its own object, so it must not be on the player or the spline object.
Top-down camera
A camera high above the player at a fixed angle, with zoom levels, rotation in 90° steps and panning, for strategy or twin-stick games.
| Where | Component or modifier | Settings |
|---|---|---|
| An object of its own | Top-Down View | Target the player, Pitch 55°, ZoomDistances 8, 14, 22, the four zoom and rotate actions, PanAction, GroundFollow on. |
- Build the base setup, but put the Top-Down View on an object of its own rather than under the character, so it does not turn with the character. Set its
Targetto the character and make it the director'sDefaultView. - Bind the zoom, rotate and pan actions in the input action map.
PanActionis a vector action, for example WASD or a stick. - Play. Zoom between the three distances, rotate in steps, and pan up to
MaxPanmeters from the player. CallResetPanfrom script to move back onto the player.
Tuning
- For mouse-driven strategy games, turn on
EdgeScroll. GroundFollowkeeps the camera at the same height above hills and stairs.- A higher
Pitchlooks more steeply down, while around 35° gives a more cinematic angle.
Scripted shot and dialogue
A story beat: the camera blends to an authored shot, then back to the player. For a conversation, the shot frames the player and the person they are talking to.
| Where | Component or modifier | Settings |
|---|---|---|
Shot object, named DialogueShot | Fixed View | Target the person speaking, BlendTime 1 s, BlendCurve Ease In Out. |
| Shot view | Composition | For a two-shot: one entry under Subjects whose Object is the player, Layout Thirds Horizontal. |
| Director | Focus | Target Subject, PullTime 0.4 s. Only needed with depth of field. |
- Build the base setup.
- Place the shot object where the camera should be, facing the speakers, and add a Fixed View.
- For a two-shot, add a Composition modifier to the shot's own
Modifierslist and add the player underSubjects. - From the script that starts the conversation, call
ActivateView("DialogueShot", 100, 0, -1)on the director. Priority 100 beats volumes and the player view, duration 0 holds until released, and blend time -1 uses the view'sBlendTime. - When the conversation ends, call
ReleaseViewByName("DialogueShot", 1). The camera blends back to the player over one second.
Tuning
- For a reveal that ends by itself, pass a duration, for example
ActivateView("RevealShot", 100, 4, 1.5). - To glance at something without leaving the player's camera, give it a Camera Point Of Interest and call
LookAtObjecton the director. See Press F to look at a shrine. IsBlending()tells a script when the blend has finished, for example to start the first line of dialogue.- A sequence that cuts to its own Main View camera takes over by itself: the director steps aside while the sequence camera is showing and blends back afterwards.
Explosions and shaking areas
Explosions shake the camera more the closer it is, and some areas, such as a rumbling engine room, shake constantly.
| Where | Component or modifier | Settings |
|---|---|---|
| Director | Shake | UseShakeVolumes on (the default). |
| Explosion prefab | Camera Shake Volume Sphere | Strength 1, Radius 15, BurstDuration 0.4 s, OnFinishedAction Delete Component. |
| Engine room | Camera Shake Volume Sphere | Strength 0.25, Radius 10, BurstDuration 0. |
- Build the base setup and add a Shake modifier to the director.
- Add a Camera Shake Volume Sphere to the explosion prefab with the burst settings above. Each explosion now shakes the camera briefly, less toward the edge of the radius.
- Add a constant Camera Shake Volume Sphere to the engine room.
- For a hit that should shake at any distance, call
AddTrauma(0.5)on the director.
Tuning
- Trauma is squared before it moves the camera, so small values stay subtle and big hits stand out.
TraumaDecaysets how fast it settles. - Shake volumes are measured at the camera, not at the player. A volume the player is inside but the camera is outside does not shake.
- When gameplay code already knows where a hit happened, send a
plMsgCameraImpulsewith Type Shake, aPosition, aRadiusand aStrengthinstead of placing a volume.
See also: Gameplay Cameras · Camera Views · Camera Director · The Modifier Stack · Framing, Look At and Focus