Tracking a parented layer

Moderators: Disciple, zlovatt

Post Reply
raydnz
Posts: 3
Joined: November 23rd, 2008, 4:35 pm

Hi. Kinda new to expressions in AE so this is well over my head... i want the 3D camera to track a layer which is parented to another animated layer (ie Parent layer is animated thru 3D space, child layer is spinning around the parent (an old 3D trick to fake handheld motion). However i can't just link the camera POI to the target layer obviously so i need to return the child layers world position... where do i begin?
Thanks
R
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Try this expression for the POI:

L = thisComp.layer("Your Child Layer's Name");
L.toWorld(L.anchorPoint)


Dan
raydnz
Posts: 3
Joined: November 23rd, 2008, 4:35 pm

Thanks for that, Dan. I'll give it a shot...
hype
Posts: 94
Joined: November 27th, 2006, 11:08 pm
Location: Los Angeles, CA
Contact:

You could also use TrackerViz for this. Just select the child layer, pick Track Combine from TrackerViz's drop down menu, set it to keyframes, and run it. It will make a new little solid that is entirely independent and has keyframes of the child layer's position.

I'm sure Dan's expression works awesome, just posting this as another option, or something to think of in the future. :)
if it's not fun, what's the point?
http://www.mackdadd.com
Post Reply