So, I'm trying to make a square shape layer scale down to 0 once it passes thru a text, so it doesnt cover the text up.
I've got this expression:
t = length(position, thisComp.layer("Text").position);
s = ease(t, 200, 0, 0, 100);
But it only references the text's anchor point, which is in the center. My problem is the square shape layer is multiple (lots of squares going thru) and they will come on a 45 degree angle. So if I adjust the distance from the anchor point which the scaling will begin horizontally, the vertical distance gets too large, and vice versa (except it gets too small for the horizontal once I adjust the distance based on the vertical).
I've figured that if I make 4 layers of the same text, each with an anchor point in the extremities (up, down, right, left) and managed to reference each anchor point to the proximity scaling, it should work the way I wanted, but I dont know how to use 4 values in this expression.
Except the brackets doesnt work. Anyone can give me a light? Maybe there is another way to do it that I`m missing. Sorry for any stupid questions, I`m new to the expressions world...