-
How to get layers position relative to another (rotated) layer.
I need a layer in a nested composition to follow (exactly match) a null in the parent comp.
The nested composition is smaller (but not scaled) and rotated in the parent comp.
Both the null and nested comp are parented to other layers.I can find the position of the null relative to the nested comp by getting the difference of their absolute positions but that only works correctly if the nested comp is not rotated.
Any help greatly appreciated!
Thanks!p1 = comp("parent").layer("null");
p2 = comp("nested").layer("layer");
p1W = p1.toWorld(p1.anchorPoint);
p2W = p2.toWorld(p2.anchorPoint);
p1W - p2W