Copy link to clipboard
Copied
I hope I'm doing something wrong here and it's not AE... I'm trying to connect a Beam Effect point to another layer's Position property. This other later is the Child of a Null layer which I want to animate. When I try to this, the Beam Effect point goes completely off screen.
Why don't I just connect the Beam effect point to the first layer and leave it like that? If I do it that way it does work fine. However, the parent layer which is the Null layer contains tracked Position property keyframes that are not where I want the Child layer to be. (I hope this makes sense)
Am I just doing something wrong? Is it a bug? Or just impossible?
Any help would be greatly appreciated.
Thanks in advance!
Louis
I'm trying to connect a Beam Effect point to another layer's Position property. This other later is the Child of a Null layer which I want to animate. When I try to this, the Beam Effect point goes completely off screen.
this is normal. notice that when you parent a child to a parent, the child's parameters change to be relative to the parent. so when you pickwhip via expression the beam to the child, you are giving the beam the child's altered coordinates and not the original ones.
try this expre
...Copy link to clipboard
Copied
I'm trying to connect a Beam Effect point to another layer's Position property. This other later is the Child of a Null layer which I want to animate. When I try to this, the Beam Effect point goes completely off screen.
this is normal. notice that when you parent a child to a parent, the child's parameters change to be relative to the parent. so when you pickwhip via expression the beam to the child, you are giving the beam the child's altered coordinates and not the original ones.
try this expression for the beam layer to get the absolute position of the layer:
myNull = thisComp.layer("Null 2");
myChild = thisComp.layer("child");
myChild.transform.position+myNull.transform.position
or this:
x = thisComp.layer("child").transform.position;
x+thisComp.layer("child").parent.transform.position
Copy link to clipboard
Copied
Thank you so much Roei! Are you actually adding both position properties (child and parent) to get the child's relative position?
Thanks again!
Copy link to clipboard
Copied
If you want to speed up the project a little, there are plenty of scripts that do exactly the same thing, and allow you to avoid the hassle of fixing this kind of stuff manually.
Just check on Youtube.
Copy link to clipboard
Copied
If I also wanted to include the Rotation property would then do this?
x = thisComp.layer("child").transform.position;
x+thisComp.layer("child").parent.transform.position;
r = thisComp.layer("child").transform.rotation;
r+thisComp.layer("child").parent.transform.rotation
Copy link to clipboard
Copied
If I also wanted to include the Rotation property would then do this?
actually not much of an expression expert. did it work for you? I think it has to be more complex