Skip to main content
Inspiring
October 30, 2010
Question

Getting global coordinates from parented local coords.

  • October 30, 2010
  • 1 reply
  • 3967 views

I have a mocha tracked null. I child another null thats slightly offset in XY. Now the child's coordinates are relative to the parent. But how can I get the child's true position in the comp?

This seems too easy:

thisComp.layer("parentNULL").transform.position + thisComp.layer("childNULL").transform.position

Am I missing something?

This topic has been closed for replies.

1 reply

Dan Ebberts
Adobe Expert
October 30, 2010

That should work if they're both nulls, but this is probably the better way to do it:

thisComp.layer("childNULL").toWorld([0,0,0])

Or maybe this, if it's all 2D stuff:

thisComp.layer("childNULL").toComp([0,0,0])

Dan

Inspiring
October 30, 2010

Aha! Fantastic! I was getting some minor misalignment errors with my method. Yours is spot on! Thank you!