Looks like what is happening is over shoot. When I do this I use a control layer, since I’m usually working on multiple layers of objects, but can you apply this expression directly to any keyframeable parameter, set your frequency and decay, then add a couple keyframes to get this action.
freq = thisComp.layer("Control Layer").effect("Freq")("Slider");
decay =thisComp.layer("Control Layer").effect("Decay")("Slider");
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
Here is a project where I use a control layer.
10830_scalebouncecontroller.aep.zip
Johnny Cuevas, Editor
ThinkCK
“I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
—THOMAS EDISON on inventing the light bulb.