hi there
i’ve been at this for hours now and can’t find the right solution. I have a null in a 2D comp which is parented to another layer (it’s part of the torso of a character puppet and parented to a controller).
this 2D character comp is within my 3D main comp as a 3D layer. i need to parent another 3D layer in the main comp (the arm) to the nested, parented 2D null (it’s an anchor for the arm).
i can’t quite figure out the relative positions – it’s attached, just not correctly! the character comp layer is also parented to another 3D layer in the main comp (the boat it’s sitting in) which is throwing out the Z position.
i’d be hugely grateful for any help!
many thanks,
Mark
code below:
ancNull = comp("archie_row").layer("Torso_Arm_Anchor_NR");
ancNullPos = ancNull.toWorld(ancNull.transform.anchorPoint);
thisArchie = thisComp.layer("archie_row");
nullPos = thisArchie.toComp(ancNullPos);
posX = nullPos[0];
posY = nullPos[1];
thisArchiePos = thisArchie.toWorld(thisArchie.position);
posZ = thisArchiePos[2];
[posX, posY, posZ];