-
toComp, nested object inside a Corner Pin effect
Hi there
I’m using toComp to get the 2D screen position of a nested child object.
I’m having trouble with a Corner Pin effect in the hierarchy.Sorry for the long-winded post, just explaining what I’ve tried.
The structure:
MAIN (I want the OBJECT’s screen position in this comp)
/ NESTED (has a Corner Pin effect applied)
/ / OBJECTAll comps are 2D.
I’m using the following expression:
c = comp(“NESTED”).layer(“OBJECT”);
c.toWorld(c.transform.anchorPoint)But all I’m getting is the OBJECT’s position, ignoring the Corner Pin.
A couple of clips –
Corner Pin turned off https://jmp.sh/i3sJtnJ
Corner Pin active https://jmp.sh/cESI8SLI’ve also tried pre-comping NESTED (so the corner pin effect is pre-composed) with the following expression, but I get the same results.
L1 = comp(“NESTED precomp”).layer(“OBJECT”);
P = L1.toWorld(L1.transform.anchorPoint);
L2 = thisComp.layer(“NESTED”);
L2.toComp(P);Any ideas how I can get the screen position of the dot (OBJECT) when it’s been pinned?
I fear the easy answer is toComp somehow doesn’t ‘see’ the effect of corner-pinning, but hope it’s down to my mistakes!
Thank you.