Re: Linking Parented Layers Postion by Mike Moser on May 17, 2008 at 8:14:36 pm
Thanks Dan!
the parented layer is actually a pre-comp.
So I should have said that I need help linking a light to a parented pre-comps 3d position.
I tried modifiying your suggestion to
L = thisComp.layer("Plane red ball");
L.toWorld(L.anchorpoint)
It tracks but the alignment is off.
Basicly, I'm trying to create a Indiana Jones Map
and this is what I have done:
Create a path, attach a solid and orient along path.
Parent a pre-comp'd Plane layer (which tracks perfectly).
My issue comes when I try and parent a light to use as a emitter for particular.The alignment shifts. I need the alignment perfect as it needs to leave a trail from the tail of the plane.
I know I'm doing something wrong but can't figure it out since my plane layer is perfect.
Here is just the project with plane with track file if you can have a quick look: 1.2mb
Re: Linking Parented Layers Postion by Dan Ebberts on May 17, 2008 at 9:11:23 pm
Yup. It looks like you really want to track the "red ball" layer inside the parented "Plane red ball" comp.
There are a couple of problems. One is that the red ball is masked section of a comp-sized layer that is offset from the layer's anchor point. So, I would add a null ("Null 1") in the "Plane red ball" comp positioned at the center of the red ball.
The other problem is that you have the emitter light parented, so you need to undo that.
Then you can add this expression to the light's position:
L = comp("Plane red ball").layer("Null 1");
CL = thisComp.layer("Plane red ball");
CL.toWorld(L.toWorld(L.anchorPoint));
Re: Linking Parented Layers Postion by Mike Moser on May 17, 2008 at 10:59:42 pm
Perfect, your Amazing! That makes alot of sense now that I see my mistake.
Last hurdle now is trying to get the particle stream to orient with the camera, I think orientation or rotation was being controlled before by parenting the light to the plane layer, now they are following from the tail, but not rotating.