-
Inertia bounce expression – error: velocityAtTime is not a function
Hi,
I am pretty new to After effects and entirely new to Expressions, I have tried to use this expression on a shape but I get this error message:
After Effects warning: Expression Disabled
Error at line 14 in property ‘Path’ of layer 1 (‘TP button Outlines) in comp ‘Tp button’.
TypeError: velocityAt Time is not a functionCan anybody help?
Thanks!
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 && t < 1){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .05;
freq = 4.0;
decay = 8.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}