Lerp, FInterp To, and moving things smoothly¶
Smooth movement is not one node. It is a choice about who owns time: an alpha you drive, a per-frame interpolation node, or a Timeline.
The one-minute version¶
Lerpblends between A and B by an Alpha. With Alpha0, you get A. With Alpha1, you get B. Values between them give positions between them.- A good Lerp usually keeps A and B fixed, then drives Alpha from
0to1over time. FInterp To,VInterp To, andRInterp Toare per-frame "move current toward target" helpers. They needDelta Secondsand are usually called from Tick or another repeated update.Interp Toeases out because it moves faster when far from the target and slower as it gets close.- A Timeline plays authored curve tracks over time. It is usually the cleanest beginner tool for doors, moving platforms, fades, and fixed-duration UI animations.
- Do not Lerp from the current value to the target with a constant alpha every Tick unless you deliberately want an ease-out chase. It is frame-rate dependent and may never exactly equal the target.
- For Characters and AI, prefer movement systems (
Add Movement Input, AI Move To, Character Movement, root motion) over hand-setting actor locations unless this is presentation or scripted motion.
The three smoothing idioms¶
Most beginner smoothing graphs are one of these:
| Idiom | Shape | Best for |
|---|---|---|
| Lerp with driven alpha | Fixed Start, fixed End, Alpha goes 0 -> 1 | Doors, UI bars, one-shot moves with known duration. |
| Interp To in repeated update | Current moves toward Target using Delta Seconds and Interp Speed | Cameras, aim rotation, values tracking a moving target. |
| Timeline | Authored curve drives values on Update | Doors, lifts, fades, bespoke ease curves, reversible scripted motion. |
The node names matter less than the ownership of time. If no part of the graph is advancing time, nothing is being animated.
Lerp: fixed endpoints, moving alpha¶
Lerp means linear interpolation:
Alpha = 0.0 -> A
Alpha = 0.5 -> halfway between A and B
Alpha = 1.0 -> B
The stable beginner pattern is:
StartLocation = closed position
EndLocation = open position
Alpha = elapsed time / duration, clamped 0..1
NewLocation = Lerp(StartLocation, EndLocation, Alpha)
SetRelativeLocation(NewLocation)
That works because Start and End stay fixed for the whole motion. Alpha is the only thing changing.
For a 1-second animation:
Elapsed += Delta Seconds
Alpha = Elapsed / 1.0
Alpha = Clamp(Alpha, 0, 1)
Location = Lerp(Start, End, Alpha)
When Alpha reaches 1, the value reaches End. You can stop ticking or mark the
motion complete.
The Lerp-from-current trap¶
This graph looks reasonable and causes many beginner bugs:
Event Tick
-> Current = Get Actor Location
-> New = Lerp(Current, Target, 0.1)
-> Set Actor Location(New)
It does not mean "take 0.1 seconds to arrive." It means "each frame, move 10% of the remaining distance." At different frame rates, it runs a different number of times per second. As the actor gets close, the remaining distance shrinks, so each step gets smaller.
The result is an ease-out chase:
remaining distance: 1000
after one step: 900
after next step: 810
after next step: 729
...
It gets close quickly, then crawls. If your code waits for exact equality, it may never finish in the way you expect.
Use one of these instead:
- fixed Start/End plus Alpha driven by elapsed time;
VInterp ToorFInterp TowithDelta Seconds;- a Timeline with a float track from
0to1; - a movement component if this is real character/AI movement.
Interp To: current toward target¶
FInterp To, VInterp To, and RInterp To are built for repeated updates:
Event Tick
-> Current = current value
-> Target = desired value
-> Interp To(Current, Target, Delta Seconds, Interp Speed)
-> Set value to Return Value
Use the version that matches the value:
| Node | Value type | Common use |
|---|---|---|
| FInterp To | Float | Zoom amount, health bar display, camera boom length, opacity-like values. |
| VInterp To | Vector | Camera location, actor/component location, offsets. |
| RInterp To | Rotator | Smooth turning toward a look-at rotation. |
Interp Speed is not "seconds to arrive." It is a responsiveness number. High
values approach the target faster. Low values lag behind. 0 jumps to the
target for FInterp To according to the Blueprint node docs.
Because these helpers ease out, do not use exact equality as the finish test:
Bad:
if Current == Target
Better:
if distance/current difference <= tolerance
For a constant units-per-second approach, use the Interp To Constant variants
instead of the easing versions.
Delta Seconds is the frame-rate fix¶
Frame length changes. Delta Seconds is the amount of game time since the
previous frame.
Frame-dependent:
Every Tick:
Current += 10
Frame-rate aware:
Every Tick:
Current += UnitsPerSecond * DeltaSeconds
Interp To nodes take Delta Time for the same reason. If you leave it at a
constant made-up number, the smoothing no longer reflects the actual frame
time.
See The frame: Tick, timers, and timelines for the bigger mental model.
Timelines: authored curves over time¶
A Timeline is a curve player inside a Blueprint. You add float, vector, color,
or event tracks, then call Play, Play from Start, Reverse, Stop, or
Set New Time.
For a door:
Interact
-> Timeline Play from Start
Timeline float track Alpha: 0 at time 0, 1 at time 0.7
Timeline Update
-> Lerp ClosedRotation to OpenRotation by Alpha
-> Set Relative Rotation on DoorMesh
Timeline Finished
-> bDoorOpen = true
The Timeline owns elapsed time and curve shape. That is why it is better than a hand-written Tick for many first-project authored motions.
Use a Timeline when:
- the motion has a known duration;
- designers need to edit ease/keyframes;
- the motion should reverse cleanly;
- you want a
Finishedpin; - the value should follow a custom curve, not just "approach target."
Avoid a Timeline when:
- the target changes every frame, such as a follow camera chasing the player;
- hundreds of actors need the same simple smoothing and a component/system should own it;
- you are trying to pathfind or physically walk a Character through the world.
Which one fits common beginner jobs?¶
| Job | Usually use | Why |
|---|---|---|
| Door opens when interacted with | Timeline + Lerp | Fixed start/end and known duration. |
| Moving platform follows an authored path | Timeline or spline/movement component | The motion is designed, not just chasing. |
| Camera smoothly follows a target | VInterp To / Spring Arm lag | The target keeps moving. |
| Turret turns toward the player | Find Look at Rotation + RInterp To | Target rotation changes as the player moves. |
| Health bar display eases toward real health | FInterp To or short Timeline | Presentation value follows gameplay value. |
| Character walks to a point | Character Movement, Add Movement Input, or AI Move To | Movement/collision/pathing should own it. |
| AI enemy chases player | AI Move To / Behavior Tree later | Navigation, controller, and path following matter. |
| Fade a light or UI color | Timeline | Authored finite presentation curve. |
The quick path is to use Tick plus Set Actor Location for every smooth thing.
The concrete cost is that you bypass collision, movement modes, AI pathing,
network correction, and finish conditions that the engine systems already
provide.
Sweeping and collision¶
If you smooth an actor by repeatedly calling Set Actor Location, you are
manually placing it. Collision behavior depends on the node's Sweep and
Teleport pins, the root component, and what kind of object is being moved.
For a door mesh rotating in place, that can be fine.
For a player Character or AI enemy, it is usually the wrong layer. Character Movement and AI path following know about movement modes, acceleration, floor checks, navigation, and blocking collision. Hand-placing the actor can create tunneling, clipping, or server correction bugs.
See World vs relative transforms before smoothing transforms manually.
Common traps¶
- You think Alpha is time. Alpha is blend amount. You decide how time becomes Alpha.
- You change A every frame in a Lerp. That turns the Lerp into an ease-out chase, not a fixed-duration move.
- You use a constant per-frame Alpha. The motion changes speed with frame rate.
- You wait for exact equality. Easing/interp values may get close without matching exactly in the way your branch expects.
- You forget to clamp Alpha. Values outside the expected range can overshoot for Lerp-style nodes that do not clamp for you.
- You call Timeline Play every Tick. You keep restarting the animation instead of letting it progress.
- You use a Timeline for a target that keeps moving. The authored curve does not know the target changed unless your graph accounts for that.
- You smooth real character movement by setting actor location. That fights the movement component, collision, and multiplayer correction.
- You leave Delta Seconds disconnected or fake it. The result is not tied to real frame time.
Debugging smooth motion¶
Print or watch:
- current value;
- target value;
- Alpha or Interp Speed;
- Delta Seconds;
- distance/difference to target;
- whether the update event is still running;
- whether the final Set node is actually executing.
For a Timeline, watch the Update pin and the track output. For an Interp To
graph, watch whether Target is changing every frame. For Lerp, confirm that A
and B stay fixed while Alpha changes.
Lookalikes - which one do I want?¶
| Tool | Use when | Watch out |
|---|---|---|
| Lerp | Blend between fixed A and B using your own Alpha. | Alpha is not automatically time. |
| FInterp To / VInterp To / RInterp To | Current value should ease toward a target every update. | Interp Speed is responsiveness, not duration. |
| Interp To Constant | You want a constant rate toward target. | Less eased/polished, but easier to reason about as speed. |
| Timeline | A Blueprint should play an authored curve over time. | Must be played once and allowed to update. |
| Timer | A repeated or delayed event should happen occasionally. | Poor tool for per-frame smooth motion. |
| Delay loop | A rough sequence can wait between steps. | Not smooth motion and hard to cancel cleanly. |
| Character Movement / AI Move To | A pawn should actually move through the world. | Not just presentation smoothing. |
| Spring Arm Camera Lag | A follow camera should smooth behind the target. | Use the camera system before custom Tick math. |
Going deeper¶
- The frame: Tick, timers, and timelines - how repeated updates and Timelines run.
- World vs relative transforms - what you are moving when you set world or relative transforms.
- Get Forward Vector & Find Look at Rotation - smooth turning toward a target direction.
- Add Movement Input - player pawn movement requests, not manual transform placement.
- Character Movement Component: the knobs that matter - movement-system smoothing before custom transform math.
- Official docs: Lerp, FInterp To, FMath::FInterpTo, VInterpTo, RInterp To, Add Timeline, Timelines, Editing Timelines, and Timeline Nodes.
- Engine source (requires engine access - we do not reproduce it here):
FMath::Lerp,FMath::FInterpTo,FMath::VInterpTo,FMath::RInterpTo, and constant interp helpers live inEngine/Source/Runtime/Core/Public/Math/UnrealMathUtility.hwith vector and rotator implementations inEngine/Source/Runtime/Core/Private/Math/UnrealMath.cpp; Timeline behavior lives inEngine/Source/Runtime/Engine/Classes/Components/TimelineComponent.handEngine/Source/Runtime/Engine/Private/Components/TimelineComponent.cpp.