Parenting two objects so they don't seperate when camera moves...
by Evan Seitz
on
Sep 1, 2009 at 11:06:28 pm
I have a simple camera moving from left to right. There is a traffic light on one layer and a red lens flare on the second. When the camera moves, these two objects don't stay together. I tried whipping the position of the red light to the traffic light but I couldn't make it work. What should I do?
Re: Parenting two objects so they don't seperate when camera moves... by Darby Edelen on Sep 2, 2009 at 2:30:06 am
I'm guessing the red traffic light is a 3D layer? If it is, you can apply your lens flare to a black 2D comp-sized solid at the top of your layers set to 'add' or 'screen' then use a simple expression to link the position of the lens flare (in 2D) to the position of the red traffic light (in 3D). Try applying this expression to the lens flare center:
l = thisComp.layer("RedLight"); //this points to your Red Light layer
l.toComp(l.anchorPoint); //this makes the Lens Flare's 2D coordinate line up with the location of the Red Light layer's anchor point in 3D
Note that the lens flare will 'attach' itself to the anchor point of the red light layer, so if your anchor point isn't where you want it you can use the Pan Behind tool (Y) to move the anchor point where you'd like it on the layer.
Re: Parenting two objects so they don't seperate when camera moves... by Ben Heusner on Sep 2, 2009 at 6:11:31 pm
Basically Alt-click in the Flare Center property and paste in Darby's expression.
If your Red Light layer is not called "RedLight" then select everything in the first line after "l =" and pickwhip your Red Light layer. This will type in the correct layer name for you.
Simple as that.
Hope that helps,
Ben
Curious Turtle Pro Video Training | Editing | Support
Out Now - Film Wash Color Effects Vol. 3
for After Effects & Apple Color
Re: Parenting two objects so they don't seperate when camera moves... by Darby Edelen on Sep 2, 2009 at 9:16:21 pm
[Evan Seitz]"the same goes for "1.anchorPoint"."
Ben covered the other part of your question. That isn't a '1' it's a lower case L, as in the variable that contains the layer 'RedLight' (or whatever your layer is named).