Easing Lerp for animation

I have made this zLerp function to try and smoothen out an animation here:

the original is the too - oLerp. but i would like to get rid of the pumping, breathing like effect.
Any ideas?

Have you tried the built-in ease functions?

For eg, using the bezier curve ease function:

4 Likes

Thanks !
been able to implement it like this:

const ease = new BABYLON.BezierCurveEase(.65,.39,.26,.54);
    function zLerp(start, end, value) {
        var tMod = ease.easeInCore(value);
        var result = start + (end - start) * tMod;
        return result;
    }

Thanks @Evgeni_Popov !
(numbers taken from https://cubic-bezier.com/)

see it at work:

1 Like