-
Simple script for Layer 2’s anchor point relative to Layer 1’s scale.
Hello everyone,
I’m stumped over what I think should be a relatively simple expression.
What I’m needing is an expression that pulls a box up as the (text) layer above it gets smaller. The intended effect is for the box to continue to touch the bottom of the text layer no matter what the scale of the text layer is.
As of right now, I have the two layers (a text layer and a solid with a masked rectangle sitting directly below the text layer) both with their anchor point at the same coordinates in the comp (at the top left of the text layer). When I lower the scale value of the top (text) layer, it, as expected, gets smaller and moves towards it’s anchor point. I’ve been messing around with a number of expressions for the y value of the solid layer’s anchor point so that it moves vertically at the same rate that the text layer is shrinking (and/or growing). Nothing I’ve tried has given me the desired result.
I’m sure it’s easy but the math keeps eluding me.