-
Delayed trail animation
I’m animating a series of vertical bars and trying to have them move in from either side of the frame and have them stop at specific points. The attached video is how I did by key framing each individual bar’s position property and staggering the layers. However, I’m trying to make it easier to customize the speed in which they animate in and out without messing with keyframes and staggering layers and all that jazz.
For starters, I created a null with a slider control on the Y position property and used the following linear expression to have the center vertical bar animate in based on the null’s position slider and it works perfectly for that one.
“var p1 = thisLayer.position;
var p2 = thisComp.layer(“null”).position;
var delta = sub(p1,p2);
var distance = length(delta);
ease(distance,0,540,[960,540],[2020,540]);”
I tried a few different methods to get the other vertical bars to work – like valueAtTime – and that gets the delayed animation, but it ends up stopping in the same position as the center bar instead of next to it. I also tried just using the same above expression and making p2 = the center bar’s position property instead of the null’s position property, and that made it stop in the correct position, but overshot it and animated backwards.
I’m lost and not sure where to go from here. Any suggestions or help? I also attached the AE project itself.
Thanks!