Lock-on1.3
Lock onto a target and frame the two of you together. One asset, a Lock-On Preset, says how the shot looks, and it can be swapped from a node, a volume or the target itself.
The lock-on keeps you and your target in shot together while you both move. You press a button, the lock picks the target you're looking at, and the camera eases into a framing of the pair: you on one spot of the screen, them on another, with the camera working out where to stand to keep it that way. How that shot looks is a Lock-On Preset, an asset you author once and swap whenever you like.
Set it up#
- 1
Add the lock-on.
Put a Blendable Lock On component on your pawn, beside its Blendable Follow Camera.
- 2
Give it a Base Preset.
The Lock-On Preset that frames a lock when nothing else asks for one. Each style's folder has one to match its camera: Third Person lock-on goes with the Third Person preset.
- 3
Bind the buttons.
Call Toggle Lock from your lock-on button and Cycle Target from a flick of the stick or a shoulder button. That's a working lock-on.
- 4
Mark your enemies, if you like.
A Blendable Lock-On Target on an enemy gives it lock points (a head, a weak spot), a size for framing, a preset of its own and a reach. Without one, anything on the Pawn collision channel can be locked.
What a Lock-On Preset holds#
A preset reads from the top down, broad strokes first. Each feature is one line: its name, its switch if it has one, and a few words on what it's doing right now, such as Up to 3 within 8 m of the target, pulls back up to x1.5. Switch a feature on and its settings come in under it; switch it off and the line just says Off. The finer numbers wait in a More fold at the bottom of each feature.
| Band | What's in it |
|---|---|
| The Shot | The diagram and Shot Preview, Solve The Two-Shot and where you and the target sit. Then the timing: Framing Blend Time, how long the lock takes to come in and to go, Time Follows The Turn, which takes longer the further the camera turns, Blend Time for a change of preset partway through, and Who Turns The Camera. Then the three that decide how far round and how wide the shot goes: Limits, Frame The Group and the Camera. |
| Behaviour | What gives when the fight moves: The Line, The Stick, Frame Big Targets, Framing Detail, How It Follows and Dynamics. See the two-shot. |
| Feel | Transitions, Focus, Effects and Markers: how a lock starts, lets go and moves on, what the lens keeps sharp, what plays, and the marks over targets. See moves, effects and focus. |
| Advanced | Changing Camera Style Takes, how long a lock takes when one of the lock's camera and yours holds its angle and the other turns, Rig Priority, Hooks for gameplay, and the preset's name and description. |
Limits is open from the start: how far the camera may come round (Come Round No More Than) and tilt, any yaw or pitch range, and how far back it may stand. Everything in Behaviour belongs to the two-shot, so it waits while the two-shot is off, and Without The Two-Shot takes the two-shot's place under The Shot.
Go deeperWhy the panel reads this way
Every setting used to sit in the order it was written, so Come Round No More Than was a long scroll from the spots it limits, between a crossing time and a spring. Now the shot's basics are at the top, and a feature you don't use is one line that says so.
Only the panel moved. Every setting keeps its name and its place in the asset, so nothing saved changes, and Blueprints that read a preset read it as before. A test builds the panel the way the editor does and fails if any setting is missing from it or on it twice, so a setting added later can't fall off.
The diagram at the top of every Lock-On Preset draws its shot: you and a made-up target where the shot puts you, the spots as rings you can drag, and a red line wherever something gave. Under it, Shot Preview lets you move the made-up fight about and play the effects through. None of that is saved or reaches the game.
The lock's camera#
A lock doesn't bring a camera of its own. It takes the one the player is already on and changes only what you add under Camera. The list there is the changes this preset makes and nothing else: Change something about the camera adds another, and unticking one hands it back to the player's camera. The changes it can make:
| Setting | What it changes |
|---|---|
| Arm Length | How far back the camera stands. |
| Field Of View | How wide the lens is. |
| Hold An Angle | Looks down at a fixed angle, top-down or isometric, instead of turning with the lock. |
| Handheld | The camera operator's sway, or none. |
| The Character Faces | Which way the lock asks the character to face, such as Aim to strafe round the target. |
| Pitch Response | How far back the camera stands and how wide the lens goes as the shot looks up and down. With the two-shot it answers the stick steering the shot, measured from where the shot rests. |
| Composition As You Steer | How the two of you move on screen as you steer the shot: the camera's Looking Up, Looking Down and While Turning, read from the stick. |
Anything left unticked stays as the player's camera has it, so one preset frames the same whether the player is on a third-person camera or a survival-horror one. Start From A Rig starts the lock from a Rig of yours instead, for a preset made for one particular camera.
The side view at the top of Camera draws the result: you, the target, the camera where the lock stands it, the arm out to you and the lens as a wedge. Each part carries the name of the setting that decides it, blue where this preset sets it and grey where it comes from the camera it starts from. Drag the camera to set Arm Length and an edge of the lens to set Field Of View; either ticks the setting as it moves. Which camera stands in for the player's is The Player's Camera in Shot Preview, starting on the camera preset beside the Lock-On Preset in its folder.
Where the stick steers the shot, two hollow cameras stand where steering all the way down and all the way up leaves it, with the arm and the lens its Pitch Response gives it there.
Without the two-shot#
Switch Solve The Two-Shot off and the lock frames the way a lock without a preset does: it turns the camera to the target, and Two Subject Framing keeps you both in. Three settings say how it turns, and a diagram under Without The Two-Shot draws them:
| Setting | What it does |
|---|---|
| Turns To The Target | How quickly the camera comes round. Standing still, it always comes all the way round; on the move, the camera's own follow keeps a share of the turn. |
| Holds Against The Stick | How firmly the camera holds the target when you push the stick away. At 1 the stick can't move it at all. |
| Glides To A New Target Over | How long the point the camera turns to takes to cross to a new target, eased at both ends. |
The diagram shows a lock made on someone well to one side, with a line where the camera has got to a quarter, a half and three quarters of the way through the turn, and the times it takes to get half way and all the way. Beside it, the glide to a new target is a dot for each twelfth of its time, bunched at the ends where it eases.
Two Subject Framing, under the same heading, says how the camera keeps the two of you in while it turns:
| Setting | What it does |
|---|---|
| Slide Towards Them | How far the point the camera holds slides from you towards the middle of the two of you, 0 to 1. Keep it low and you stay the subject. On a camera that holds its own angle it goes all the way. |
| Pull Back To Fit You Both | Stands the camera back far enough to keep you both in shot. |
| Room Around You | Room left round the two of you, so nobody sits on the edge of the frame. |
| Pull Back Up To | The furthest it stands back to fit you both, as a multiple of its arm. |
A lock without a preset takes these from Two Subject Framing under Without A Preset on the lock-on component, and Set Two-Subject Framing on the follow camera sets them for anything else that frames a second subject, a conversation, say.
Go deeperWhy Two Subject Framing moved
In 1.1 these four were on every Rig, though only a lock ever used them, so every camera, first person included, carried settings for framing an enemy. They belong to whatever asks the camera to frame a second subject, the way a lock says everything else about itself. A Rig whose values were changed passes them on as it loads: to the lock-on component that uses it, and to a Lock-On Preset that starts from it and hasn't set its own.
Who picks the preset#
Several things can ask for a preset at once, and the highest priority frames the lock:
| Asked for by | Priority | For |
|---|---|---|
| A Blueprint node or anim notify | 40 | A parry, a finisher, a scripted beat |
| The locked target | 30 | A boss that frames itself its own way |
| A Lock-On Volume you're in | 20 | A corridor, an arena |
| The Base Preset | 10 | Everything else |
On a tie the most recent wins. Push Lock-On Preset asks under a name and Pop Lock-On Preset lets go of that name, so two systems never take each other's claims away. The numbers are on the lock-on component, and every source can give its own.
How a lock moves#
Everything a lock moves arrives as one move. Locking on, the framing, the lock's camera and its aim all come in over Framing Blend Time, eased at both ends, and land together. Letting go, they go over the same time, and the view you're handed is the one on screen: the camera doesn't turn back towards a target the lock has let go of.
With Time Follows The Turn on, locking on takes longer the further the camera has to turn, so every lock turns at the same pace: someone almost ahead of you comes in over Framing Blend Time, someone behind you over as long as Turning At takes to get round to them, up to No Longer Than. Every preset comes with it on, turning at 90 degrees a second up to 1.4 seconds; Third Person and Open World take at least 0.6 seconds.
As the lock comes in, the target slides across the picture to its spot in one move, the camera turning however it must while the lens narrows and the camera swings round you.
Standing still while locked on is never idle. The camera's idle shot waits for as long as a lock holds: its clock stays at zero and starts again from zero once the lock lets go, however the lock ends. Untick Not While Locked On in the camera's Idle settings to count a lock like any other stillness.
A lock that changes the camera's style, from your third-person camera onto a top-down or isometric one or back again, takes Changing Camera Style Takes instead, 2 seconds unless you change it. The camera cranes from behind you to overhead, several times the distance a lock moves it within one style. On the way it only swings from your view to the held one; it never turns towards the target first.
A new target glides the shot over to it, and when the camera has to move to the other side of the line, the crossing goes on the same clock as the glide. A change of preset partway through a lock blends over the new preset's Blend Time. The shot is worked out as each preset frames it on its own camera, the one it's leaving and the one it's going to, and the two are blended, so it turns one way.
Seeing what it's doing#
Type Blendable.LockOn.Readout 1 in the console and the lock-on lists, on screen, the target, the preset framing it and who asked for it, what the ladder holds underneath, where you both sit on screen, the group, focus and the effects playing. Get Lock-On Readout returns the same lines to a Blueprint, and Live Tune shows them under its numbers.
In Live Tune, the Lock-On button edits whichever Lock-On Preset is framing the lock, and follows the lock as it moves between presets. Edits reach the lock as you make them.
Go deeperHow a target is chosen
Toggle Lock takes the best target in view: within Max Lock Distance (2500 cm), within Max Lock Angle (60 degrees) of the middle of the screen, and in sight if Require Line Of Sight is on. Aim Bias decides what "best" means: 1 is whatever is nearest the middle of the screen, 0 whatever is nearest you, and the default 0.8 mixes the two. A Lock-On Target can reach further or less with its own Lock Distance, and its Acquire Weight makes it win or lose the close calls.
Your game can hand the lock its own pick with Set Preferred Target, such as the thing the player is looking at to use. Toggle Lock then takes it whenever it could be locked at all (in reach, in view, in sight and lockable), whatever the scores, so when your prompt says "Search the crate" the lock goes to that crate and not the barrel beside it. Switching targets ignores it, and None leaves the usual choice.
With Sees Over Low Cover on, a target whose middle is hidden still counts as in sight when its top shows from your eyes: a crate behind a low wall, someone whose head shows over a counter. Behind anything taller than them, still never.
A lock lets go on its own when the target gets Break Distance Slack (600 cm) past its reach, when it's been out of sight for Lose Sight Grace (1.5 s), or when its Lock-On Target stops being lockable. Each way is told apart: On Lock Ended says whether the lock was let go, broken or lost.
Go deeperWhy 2 seconds to change style
Within its own style, a top-down lock moves the camera at no more than 13 metres a second: the middle of the shot sliding over to the fight. From a third-person camera the same lock cranes from 3.7 metres behind you to 13.5 metres overhead, and in its 0.4 seconds that peaked at 62 metres a second, 68 for isometric. Over 2 seconds the crane peaks at 15 metres a second for top-down and 21 for isometric, which goes further: about the pace each keeps within its own style.
Go deeperWhy the aim turns all the way round
Turns To The Target pulls the view a share of the way to the target each frame, measured from where it is now, so with nothing else turning the camera each frame closes some of what's left and the turn always arrives. The share sets how quickly. On the move, the camera's own follow turns it towards where you're going, by the share the aim leaves it, and the two settle somewhere between. The diagram's numbers come from the same steps the camera takes, and a test turns the real camera beside it at a range of settings and fails if the two part by more than one percent.