I have this great expression (below) that creates a continue of motion and decay after the last keyframe in a position animation on a 3D layer.
Problem is I only want it to happen on the Y-axis (not the x, or z-xais)
can anyone help me out and modify this?
the expression as is:
n = position.numKeys;
if (n > 0){
t = time - position.key(n).time;
if (t > 0){
freq =8;
amplitude = 50;
decay = 2.0;
s = amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
e = amplitude*Math.sin(freq*t*1*Math.PI)/Math.exp(decay*t)
value + [s,e]
}else{
value
}
}else{
value
}
decay after keyframe POSITION one axis only
Try this:
Koby.
Code: Select all
n = position.numKeys;
if (n > 0){
t = time - position.key(n).time;
if (t > 0){
freq =8;
amplitude = 50;
decay = 2.0;
//s = amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
e = amplitude*Math.sin(freq*t*1*Math.PI)/Math.exp(decay*t)
value + [0,e]
}else{
value
}
}else{
value
}