Download

[solved] FMath::Interp() with easing for quaternions?

Is there a way interp ease in/out with quats? I was doing it with Rotators but running into occasional gimbal lock.



// just some example values
FQuat startRotation;
FQuat endRotation;
Float interpAlpha 0.5f;
Float interpEaseExponent = 3.0f;

// does not compile!
FQuat newRotation = FMath::InterpEaseInOut(startRotation, endRotation, interpAlpha, interpEaseExponent);


Solved. Looks like if you really want to do this you can “ease your alpha” then use that for FQuat interpolation.


float easedAlpha= FMath::InterpEaseInOut(0.0f, 1.0f, _interpolationAlpha, INTERP_EASE_EXPONENT);