Lerp in Blueprints

Hi, I’m relatively new to Unreal.
I don’t quite understand how blueprints work with Lerp.
I’ve been a C# programmer in Unity for many years and I’m used to something like this:
X= Lerp(X, toValue, smootTime);

In the blueprints, how do I set the smoothTime?

I’m rotating an object with the mouse. It works, but I would like the thing to be “lerpened”.

I have to use Add to get the right rotations with mouse.
So the mouse movement value is really small. But I would like to try a Lerp anyway.

Hey @WILEz-AM!

So you’re likely going to want to use a timeline here. Your “smoothTime” would be set within the timeline (as “Time”) and the alpha output would be 0-1.
image

Make sure your keys are at 0, 0 and (end time), 1

Then you plug that into your alpha lerp.

Also, just noticing but you’re lerping both from 0. That might be intentional, I know, but wanted to let you know just in case. :slight_smile:

Thanks, will try now!
I use 0 because it should leap from 0 to the variation on mouse movement which only goes up on movement and back to zero on stationary mouse…

1 Like