-
Keyframe Overshoot with no oscillation
I’d like to create an expression similar to your Keyframe Overshoot example except I’d like the object to overshoot the position and ease into a stop with no oscillation. Possible variables could be mass and friction to control the ease to stop motion.
Thanks.
freq = 3;
decay = 5;n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*Math.sin((t)*w)/Math.exp(decay*(t))/w;
}else
value