Hi all !
Recently, I wanted to calculate the aming rotation and write as it :
AimingRotation = FMath::RInterpTo(AimingRotation, ControlRotation, DeltaSeconds, AimingRotationInterpSpeed);
In the process, everything was calculated expected
But as soon as the rotation stopped( Delta is nearly zero), the AimingRotation changed.
I looked into the function code
// If steps are too small, just return Target and assume we have reached our destination.
if (Delta.IsNearlyZero())
{
return Target;
}
// Delta Move, Clamp so we do not over shoot.
const FRotator DeltaMove = Delta * FMath::Clamp(DeltaInterpSpeed, 0.f, 1.f);
return (Current + DeltaMove).GetNormalized();
if Delta is so small returned not ormalized Target else returned normalized result.
I have a question, was it so conceived or here a logical bug?