-
marker trigger 3d rotation
Hi,
I was using this expression to animate in a text layer on the X rotation (3D):veloc = 7;
amplitude = 80;
decay = .7;amplitude*Math.sin(veloc*time)/Math.exp(decay*time)
To make it start when I wanted, I had to precomp it (because it uses the time of the comp). So I found another expression to trigger the expression with a marker:
if (marker.numKeys > 0 && time >= marker.key(1).time){
t = time – marker.key(1).time;
freq = 2.0; //oscillations per second
amplitude = 90;
decay = 1.5;rotCos = Math.abs(Math.cos(freq*t*2*Math.PI));
x = amplitude*rotCos/Math.exp(decay*t);
value – [x]
}else{
value
}It works but it is not swinging in both directions. It bounced on the 0 value and swing back up.
Can you help me make it swing correctly using a marker as a trigger?
thanks.