Please clear my doubts regarding Lerp functions

I tried multiplying DeltaTime with 2[InterpSpeed] in FMath::Lerp() function and the results were very similar to FMath::FInterpTo()

is it true that FMath::Lerp() performs same as FMath::FInterpTo() if we multiply the interpolation or last paramerter of FMath::Lerp() with DeltaTime ?

but the value never actually reached equals to TargetYaw in either FMath::Lerp() or FMath::FInterpTo() so when to use which method if we are getting same result (as far as I know by now) in FMath::Lerp() and FMath::FInterpTo()

and also when to use FMath::FInterpConstantTo() [while using it the value actually reached to TargetYaw]

:question:

-> which one to use FMath::Lerp() or FMath::FInterpTo() when we getting same result when multiplied with DeltaTime with InterpSpeed in FMath::Lerp()

-> When to use FMath::FInterpConstantTo() ?

  1. They do the same thing essentially. Although I believe the implementation of FInterpTo is not mathematically accurate but it’s not enough to matter in games. It does however provide a better name that expresses the intent more accurately.
  2. When you want constant step. FInterpTo gets gradually slower as it reaches the target. FInterpConstantTo doesn’t, it remains at a constant speed. As such if the target is moving you almost definitely want to use FInterpConstantTo and not FInterpTo as the latter would not come close (unless the target is moving really slowly).

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

Privacy & Terms