Inertial Bounce
can be put on the scale, position ... and creates this bounce as when a ball hit the ground
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}
}
if (n == 0){
t = 0;
}else{
t = time - key(n).time;
}
if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/15);
amp = .05;
freq = 4;
decay = 8;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
Watch Out for some reason, the enter (=go to next line) are replaced by ? sign that is not understood by AE, so be sure to delete the ? mark to have the expression working
otherwise here is the a version without enter
n = 0;if (numKeys > 0){n = nearestKey(time).index;if (key(n).time > time){n--;}}if (n == 0){t = 0;}else{t = time - key(n).time;}if (n > 0){v = velocityAtTime(key(n).time - thisComp.frameDuration/15);amp = .05;freq = 4;decay = 8;value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);}else{value;}