-
Animating a property over a specified time
Hi!
I wasn’t able to find anything here or on google, but this should be really basic and easy… Maybe you could help!
I have a lot of pitures (3d) in a comp which are not animated on their own. A camera moves backwards and the pics with different z-values “fly away”. All I want to accomplish is that when a picture reaches a certain distance to the camera, it should begin scaling down to 0 over a certain amount of time, let’s say 2 sec.
The expression I’ve got right now is this one:
startScale = [100, 100, 100];
endScale = [0, 0, 0];
distance = thisComp.layer(“Camera 1”).transform.position[2] – transform.position[2];if (distance > (-12000))
{startScale}
else
{ease (time, in_point, out_point, startScale, endScale)}Works, but 2 problems: Now the scale-value stays at 100% as it should but when the layer reaches the specified distance to the cam it jumps to the value which it has at this point in time! I want it to smoothly scale down from 100 to 0!
Second is that I don’t want to use the layer in- and out-points as tMin / tMax. tMin should be the frame where the specified distance is reached (how do I convert that in time??) and tMax 2 sec later!Thanks in advance!