-
GrayMachineScript Error – CS6
Hey all,
So I’m using the latest version of CS6, and I tried using graymachine’s “super awesome presets”… inparticular the “inertial bounce” expression. I initially can add it to the position attribute of a layer, but after it code checks, I get an error:
invalid numeric result (divide by zero?) Error occurred at line 19.
Comp: ‘compName’+ _logo layered’
Layer: 1(‘ae’)
Property: ‘Position’Any ideas what this means? initially it seems to work, but then gets error’d out.
amp = .1;
freq = 2.0;
decay = 2.0;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/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}