devNotes 4-06-16 elastic slerp – quaternion tweens overshoot

fdsfgsdfg

 

dghfgdfhg

From:

I am working with Unity (C#) and was looking for an implementation of Slerp and possibly Lerp that allow overshoot (progress not strictly limited to 0..1 range). I want to do some tweening animation using an elastic ease-out function. My ease-out function returns values slightly outside the 0..1 range in order to get an oscillating-around-the-target effect. The problem is that Unity’s Quaternion Lerp and Slerp functions appear to clamp the progress input in the 0..1 range.

Implementation code in any language would be helpful. I don’t know enough about Quaternion math to write this myself.

dfgsdfgs5

Edit: the above code works great for slerp; for lerp however you’re going to get discontinuities in the derivative which you may not want. This code uses a similar technique and will work better for lerp:

The overshoot functions are:

from: