-
Changing Scale Based on Position
I am trying to have the scale of 2 solids be controlled by the position of a shape layer using this expression:
a = 1;
b = thisComp.layer(“Left_Bar”).transform.yPosition;
d = length(a,b);
s = (d/width)*100;e = thisComp.layer(“Vertical_Bar”).transform.xPosition;
f = 1;
g = length(e,f);
i = (g/width)*100;[i,s]
When for the top solid it works perfectly as the line moves up, it shrinks. But for the bottom solid it moves the inverse (see gif:
)
I think it’s an easy fix, I am just not very advance with expressions. Thanks!