Copy link to clipboard
Copied
i want to link with expression Y position of Layer A to Layer B ( B is Parenter to C).
i tried to rearrange expressions like:
L = thisComp.layer("End1");
L.toWorld(L.anchorPoint);
or
thisComp.layer("childNULL").toComp([0,0,0])
but i cannot make these expressions work just for the y value.
my knowledge of expressions is too limited please help!
Copy link to clipboard
Copied
the position values are arrays. So you can simply append [1] to get the y portion of it like this:
var L = thisComp.layer("End1");
var fullPosition = thisComp.layer("childNULL").toComp(L.anchorPoint);
var YPosition = fullPosition[1];
Copy link to clipboard
Copied
thx man
but i tried and i just get errors.
what do you mean by "End1"?
i have just 3 nulls Called A, B, C.
Copy link to clipboard
Copied
L = thisComp.layer("Shape Layer 2");
fullPosition = thisComp.layer("Shape Layer 2").toComp(L.anchorPoint);
x = [0] + effect("Slider Control")("Slider");
y = fullPosition[1];
[x,y]
i did this and it works, i put a slider there to control x indipendently
thanks a lot mathias great suggestion.
coming from c4d with tags, xpresso, and python, i really dont uderstand why ae is not catching up with more intuitive systems....get into expressions is hard!!!
Copy link to clipboard
Copied
Why don't you use the L that you defined?
L = thisComp.layer("Shape Layer 2");
fullPosition = thisComp.layer("Shape Layer 2").toComp(L.anchorPoint);
Is the 2nd line the same as
fullPosition = L.toComp(L.anchorPoint);