Jump to content
Sign in to follow this  

After Effects: Getting world space coordinates of parented null

Recommended Posts

Hi, I have a hierarchy in After Effects and I'm trying to lock a position parameter of a spherize effect on another layer to a Null that I have parented into the hierarchy, getting the sphere to follow the Null. Because the null is parented, I need to find it's world space for the expression to work since it's position values con't change when it moves. I've found several references to this expression:


lay = (pickwhip the child null layer) ;

pos = lay.toWorld( lay.anchorPoint);


Such as here:




Seems to work for everyone else, but when I implement it, I get this error:


After Effects warning: Function lay.toWorld is undefined Expression disabled.


Error occured at line 2.


Layer 17 ('HelmetReflectionAnimated')

Property: 'Center of Sphere'


Any ideas what I might be missing?

Share this post

Link to post
Share on other sites

What exactly? Post your own code. Not much point in referencing other people's template code when you could be doing something as trivial as having a typo somewhere in your own variation...



Share this post

Link to post
Share on other sites

Please, please do a site-specific Google search of this forum next time! I personally have answered this one three times, and much as it should be a sticky, it isn't. THREAD


You haven't put the array at the end of the code, even if the function were defined. Your code should look like this:


lay = thisComp.layer("Parent NULL")



Share this post

Link to post
Share on other sites

Sorry guys it's been really busy this week. I figured out the problem a bit after posting this. In case anyone needs the answer, the expression I used was:




The problem seems to have been the "pos =" part, don't know where that came from in the examples.


iline, I did search for this, didn't have much luck, maybe I was just searching using the wrong terms.


Thanks for the help guys.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...