Rotation and Interpolation Basics in UE5: Choosing Among Rotator, Interp To, and Lerp

Created: 2026-07-25Last updated: 2026-09-05

Turn a turret that snaps to the player into one that follows with a slight lag. Illustrates Rotator and Yaw, Find Look at Rotation, RInterp To, and Lerp, separating computing a direction from actually rotating.

You build a turret facing the player and it snaps around instantly. You want it heavier, turning as it takes aim. What you use for that is interpolation , closing on a direction gradually.

What matters is separating "which way do I want to face" from "how do I close on it from my current facing". This article first builds a turret that immediately faces the player, then adds interpolation and compares the motion.

Comparing setting the target directly, snapping to face the player, with RInterp To turning gradually from the current facing

What You'll Learn

  • A Rotator's three angles and Yaw, which represents horizontal facing
  • Why rotating from 350 degrees to 10 can take the long way
  • The difference in what RInterp To and Lerp compute
  • How to tune how fast the turret follows the player

Sponsored

A Rotator represents facing with three angles

The type commonly used for facing in UE is a Rotator . It bundles three angles — Roll, Pitch, and Yaw — in degrees.

ComponentAxis it rotates aroundThe motion it suggests
RollAround the X axisA plane banking left or right
PitchAround the Y axisThe nose pointing up or down
YawAround the Z axisTurning left or right horizontally

"Around an axis" means using that axis as the rotation's core. UE's base orientation is X forward, Y right, and Z up. Yaw, cored on Z, changes horizontal facing without looking up or tipping sideways.

Which axis Roll, Pitch, and Yaw each rotate around

Our turret uses Yaw only . The barrel's front extends along X and turns left and right atop the base.

350 degrees and 10 are visually close

What is slightly tricky about angles is that 360 degrees returns you to the start. 350 and 10 are 340 apart numerically but adjacent as facings.

  • Going 350 → 360 (0) → 10: a 20-degree shortcut
  • Decreasing 350 → 180 → 10: a 340-degree detour

Mixing 350 and 10 half and half as plain numbers, for instance, gives 180, not the 0 degrees along the shortcut. That is how "I wanted a small turn but it swung wide" happens.

Comparing the 20-degree path from 350 to 10 through 0 with the 340-degree path through 180

For yaw-only tracking as here, use the rotation-specific RInterp To . When using Lerp (Rotator) , also check Shortest Path , the setting that "chooses the shorter way around". A node being rotation-specific does not mean every setting rotates the same way.

Note that 350 degrees and -10 are the same facing. A retrieved angle displaying as negative does not by itself mean the rotation is broken.

Build the target direction and apply it

For the turret to face the player, first compute "which facing points at the player". Find Look at Rotation does that.

Input / outputWhat we pass here
StartThe turret's rotation pivot position
TargetThe player's position
Return ValueThe facing that looks from Start toward Target

Start and Target are Vectors representing positions , not angles. Passing two positions returns a Rotator pointing forward X from Start toward Target.

That alone does not rotate the turret, though. You need logic that applies the computed facing to the part you want rotated . The exercise below uses Set World Rotation to apply the result to the turret's head.

When the target is above or below, Find Look at Rotation's result includes Pitch. To face horizontally only, split the three angles with Break Rotator and pass Yaw alone into Make Rotator . Setting Make's Roll and Pitch to 0 gives a horizontal-only target.

Breaking Find Look at Rotation's result, passing Yaw alone into Make Rotator, and applying it with Set World Rotation

Break extracts values and Make bundles them. Without writing difficult angle math, that combination selects the components you want.

RInterp To nudges the current facing closer

Setting the target facing directly switches to it on that update. Inserting RInterp To computes a facing slightly closer to the target from the current one .

The entry point for repeating that is Event Tick , the event called as the game advances a frame, whose Delta Seconds gives the time since the previous update.

PinWhat goes inMeaning
CurrentThe current facingClose in from here
TargetThe target facingThe direction you want to face
Delta TimeTick's Delta SecondsHow many seconds since the last update
Interp SpeedStart from 2 hereThe strength of closing on the target
Return ValueThe computed resultThe facing to set on this update

Delta Time is the elapsed time corresponding to one update. How many updates fit in a second varies, so rather than "one update, so turn a fixed amount", pass the time that actually elapsed.

Interp Speed is neither degrees per second nor a completion time. With positive values, larger closes on the target faster. Under the same conditions, it also turns more when far from the target and less as it nears, so the finish eases in.

What matters here is this repetition.

  1. Read the current facing and the current target facing toward the player
  2. Compute this update's facing with RInterp To
  3. Apply that facing with Set World Rotation
  4. On the next Tick, compute again from the applied facing

RInterp To does not itself advance time or keep an Actor moving. It closes on the target because Current is reread as "the current facing" each time rather than pinned to the starting facing.

Reading the current facing, applying RInterp To's slightly closer result with a Set, and reading again on the next Tick

Nodes with the same idea exist beyond rotation.

NodeValue it computesExample use
RInterp ToRotatorA turret tracking and facing a target
VInterp ToVectorClosing a camera's position on a target
FInterp ToFloatClosing a displayed HP number on the actual HP

We use RInterp To since this is rotation. The other two likewise combine with logic applying the returned value to a position or display.

Sponsored

Lerp picks a point between a start and an end

The other common node, Lerp , picks where between A and B to use via Alpha . Using Alpha from 0 to 1, 0 is A, 0.5 is the midpoint, and 1 is B.

Consider Lerp (Rotator) with Roll and Pitch at 0 and Yaw from 0 to 90 degrees.

ABAlphaThe Yaw chosen
09000
0900.545
090190

Fixing A and B and leaving Alpha at 0.5 gives 45 no matter how many times you compute. For smooth motion, change Alpha over time and Set the result each time.

The relationship where Alpha 0, 0.5, and 1 choose 0, 45, and 90 degrees when Yaw runs from 0 to 90

Moving Alpha from 0 to 1 over two seconds with a Timeline, for instance, builds motion running from a fixed start to a fixed end in two seconds. Rather than telling Lerp "two seconds", the Timeline manages the two seconds and Lerp computes the value along the way .

Motion you want to buildThe easy combination
Following from the current facing as the target movesTick + RInterp To + Set
Moving from a fixed start to a fixed end over two secondsTimeline + Lerp + Set

That is a guide from purpose. Lerp also closes in when you feed the current value into A each time, even with Alpha at 0.5. Doing that as "half each frame" makes the follow speed depend on update count, though. For our turret, build with RInterp To, which takes elapsed time.

Hands-On: build a turret that tracks the player

Use a Third Person Blueprint project. Where a "Variant" is offered at creation, choose None . Knowing how to create components and variables and connect pins in Blueprint is enough.

We build a turret whose base stays fixed while the barrel above faces the player. It fires nothing; we focus on the turning difference.

1. Separate the pivot from the barrel

Create a Blueprint Class BP_Turret with Actor as the parent and add these components.

NameComponent typeParentRole
BaseStatic MeshDefaultSceneRootThe fixed base
HeadSceneDefaultSceneRootThe rotation center
BarrelStatic MeshHeadThe barrel extending forward

A Scene component is a part with position and rotation but no visuals. Rotating Head rotates its child Barrel too. We use it to make the top of the base the turning center rather than the barrel's middle.

Assign the standard Cylinder to Base and the standard Cube to Barrel. Both meshes live in Engine/BasicShapes ; if you cannot find them, show engine content in the asset picker.

In "Details", set Relative Location, measured from the parent, and Scale as follows.

NameRelative LocationScale
BaseX=0 / Y=0 / Z=40X=1.2 / Y=1.2 / Z=0.8
HeadX=0 / Y=0 / Z=80X=1 / Y=1 / Z=1
BarrelX=75 / Y=0 / Z=0X=1.5 / Y=0.3 / Z=0.3

Set every rotation to 0. Head's and the meshes' Mobility is Movable, Simulate Physics on both meshes is off, and Collision Presets is NoCollision. Movable means position and rotation can change during play.

Offsetting the Cube's center 75 cm along X from Head and making it 150 cm long extends the barrel forward from the pivot. That reads its facing more clearly than a cube identical front and back.

A turret with an 80 cm tall Head as the rotation center and its child Barrel extending 150 cm forward, plus the component hierarchy

Place one BP_Turret in the level with the Actor's rotation at 0, Scale 1, 1, 1 , and the Root's height matched to the floor. Put it somewhere the player can walk around.

2. Update only when the player exists

Place Get Player Pawn in BP_Turret's event graph with Player Index 0. This retrieves the Pawn the first player controls.

Connect its Return Value into the Input Object of the Is Valid with a white exec pin. Wire Event Tick's white output into Is Valid's white input and use the Is Valid side's exit later. Leave the Is Not Valid side empty.

Is Valid confirms the retrieved object is usable right now. When the player does not exist yet or was destroyed, it keeps the rotation update from running.

Going from Tick into Is Valid and continuing to the rotation update only when the Pawn from Get Player Pawn is valid

3. Build the target facing the player

Drag Head from the component list into the graph and create Get World Location from its blue output. That is Head's position relative to the whole world.

From Get Player Pawn's Return Value, create Get Actor Location . Then place Find Look at Rotation and connect the following.

Find Look at Rotation inputConnected from
StartHead's Get World Location
TargetThe player's Get Actor Location

The point is aligning both to world-space positions. Start uses Head, the turret's pivot, not the Root on the floor.

Passing Head's world position into Start and the player's position into Target to find the target with Find Look at Rotation

Create Break Rotator from Find Look at Rotation's Return Value. Connect its Yaw alone into Make Rotator's Yaw, with Make's Roll and Pitch at 0.

Breaking Find Look at Rotation's result and passing Yaw alone into Make Rotator with Roll and Pitch at 0

Getting positions, Find Look at Rotation, Break, and Make are nodes that compute and return values . Rather than wiring white exec lines in sequence, pass values through the colored pins.

4. First, snapping to face the target

Create Set World Rotation from Head's blue output. Confirm Target is Head and pass Make Rotator's Return Value into New Rotation. Connect the Is Valid side's exit into its white exec input.

Compile, Play, click the game screen, and walk around the turret. Success is the base staying still while only the barrel snaps to face the player. Jumping does not tilt the barrel up or down; it stays horizontal.

Directly above or below cannot define a horizontal facing, so walk around at a distance rather than through the base's center at first.

5. Add interpolation to the same turret

Stop Play, create a Float variable TurnSpeed , and set its default to 2 after compiling.

Place RInterp To and connect these inputs.

InputConnected from
CurrentGet World Rotation created from Head
TargetThe Make Rotator Return Value from earlier
Delta TimeEvent Tick's Delta Seconds
Interp SpeedGet TurnSpeed
Passing Head's current rotation, Make Rotator's target, Tick's Delta Seconds, and TurnSpeed into RInterp To

Now connect RInterp To's Return Value into Set World Rotation's New Rotation, replacing the line that came straight from Make Rotator. The white exec line from Is Valid and Head as Target stay as they are.

Calling Set World Rotation from the Is Valid exec and applying RInterp To's result to Head

The Set World Rotation in the diagram is the one from step 4. Do not add a new one; swap what feeds New Rotation. Leave Sweep off.

Get World Rotation returns Head's facing just before this update. Closing that slightly toward the target and writing it back to Head lets the next update continue from there.

Change the speed and confirm what stops it

Compile, replay, and walk around the turret the same way. The barrel now follows with a slight lag, and standing still gradually closes the gap until it faces you.

Stop Play, change TurnSpeed's default to 10 , and try again. It should track faster than at 2. Return it to 2 after checking.

What to tryWhat to compare
Walk around at a similar distanceWhether the barrel lags differently at 2 versus 10
Stand stillWhether the turn slows as it approaches the target
JumpWhether the barrel stays horizontal
Circle to the turret's far sideWhether the base stays fixed while the barrel tracks

We did not define "it always faces you exactly in N seconds". It varies with the initial angle difference and update interval, so compare tracking by moving the same way.

What happens without Delta Time

Stop Play, disconnect the line into RInterp To's Delta Time, and set the value to 0. Leave TurnSpeed at 2.

Compiling and playing shows the barrel no longer closing on the target, because you are saying "zero seconds passed since the last update". After checking, stop Play, reconnect Tick's Delta Seconds, and confirm it turns again.

Feeding an arbitrary positive constant into Delta Time, meanwhile, uses that constant every time instead of real elapsed time. That is what makes follow speed depend on update count. Keep "not advancing due to an unconnected 0" separate from "speed skewed by a fixed value".

Delta Time at 0 not advancing, a fixed value making speed depend on update count, and Delta Seconds advancing in real time

Also, an Interp Speed of 0 is not for stopping. In RInterp To it switches straight to the target. To halt, add a mechanism that stops the update, such as a condition preventing Set World Rotation from running.

When it does not work

SymptomWhere to check
It snaps to the targetWhether Make Rotator connects straight to the Set. Whether Interp Speed is 0 or too large
The facing never changesWhether a white line runs from the Is Valid side to the Set, and whether Delta Seconds reaches Delta Time
It turns a bit and stops thereWhether Current holds a fixed starting value. Whether you use Head's Get World Rotation
The barrel tilts up and downWhether Make Rotator's Roll and Pitch are 0 and only Yaw is passed
The whole base rotatesWhether you used Set Actor Rotation. Whether Set World Rotation's Target is Head
The barrel points sideways or backwardWhether Barrel is Head's child with rotation 0 and extends along X
Sponsored

Bonus: good to know up front

World and Relative differ in what the facing is measured against. We built the target from two world positions here, so we read the current value with Get World Rotation and applied it with Set World Rotation. To tilt 30 degrees relative to the parent, Set Relative Rotation works. Rather than choosing by whether the parent moves, align the reference of the facing you pass.

Set changes to a specified facing while Add adds to the current one. A continuously spinning windmill can use Add. In that case, deciding "one degree per frame" makes speed depend on update count. For "90 degrees per second", think of adding 90 multiplied by Delta Seconds on that update.

A Quaternion is another format representing rotation. It differs from the three Roll, Pitch, and Yaw angles and is used for composing and interpolating rotations spanning several axes. Our horizontal turret is built with Rotators and dedicated nodes. Learn Quaternions as needed when you handle freely flying craft or camera rotation.

A character's facing can sometimes come from movement settings. To face the movement direction, Character Movement Component's Orient Rotation to Movement and Rotation Rate work. Our approach helps where you want facing controlled separately from movement, such as a turret independent of its base or a security camera.

Turning speed also connects to how the game feels. A slow turret leaves room to circle behind it while a fast one makes staying out of its front hard. Before adding firing conditions and hit detection, tuning just the tracking makes the difference you aim for easier to confirm.

Summary

Build the target facing with Find Look at Rotation, close in from the current facing with RInterp To, and apply it with Set. Separating those roles makes it easier to tell "the direction it faces is wrong" from "how it closes in is wrong".

Once the turret moves, walk the same path and compare whether 2 or 10 suits your game. Beyond memorizing the computation nodes, you can confirm how one number changes the motion's impression.

Reference: Epic's RInterp To, Lerp (Rotator), Find Look at Rotation, Set World Rotation.

Unreal Engine Notes in this section98