Multiplying DeltaTime*InterpSpeed in FInterptoConstant - FInterpTo functions?

Hi, when we are involve in movement or physics, or player input, whe need to multiply the speed for DeltaTime to have framerate independent, an example is in the Lerp function.

I am using the FInterpTo- FInterpToConstant functions, they request 4 parameteres, one of them is DeltaTime and other is the InterpSpeed, my question is if I need to multiply the InterpSpeed for DeltaTime to have that framerate independent when using this functions, or the parameter (DeltaTime) that request does that, to not have to be multiplying?
And multiplying for DeltaTime is only used in Lerp function?

1 Like

No you do not need to do multiply it. That is precisely why it takes DeltaTime as an argument - to make it frame rate independent.

Lerp is just a linear interpolation between two values.

FMath::Lerp(5, 10, 0.25);

Would return 6.25 as that is a quarter of the way between those two values.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms