Copy link to clipboard
Copied
It's not a bug. Simply pointing another layer to a child layer's position never works because the child layer's position after perenting is always relative to comp center and the distance to the parent.
Three layers, all at comp center:
Parent the Child layer and the Child layer position changes to 0,0 or 0, 0, 0 for a 3D layer. Pickwhip moves the Problem layer to the same comp coordinates as the child layer, but that is not what you want:
Thinking that just subtracting the comp center seem
...Copy link to clipboard
Copied
I believe it's a bug with this new-fangled transform/ 3D gizmo stuff. I vaguely recall a similar post.
Mylenium
Copy link to clipboard
Copied
Thanks Mylenium. Do you know of a workaround? I think there's an expression that sort of works but not really.
T
Copy link to clipboard
Copied
It's not a bug. Simply pointing another layer to a child layer's position never works because the child layer's position after perenting is always relative to comp center and the distance to the parent.
Three layers, all at comp center:
Parent the Child layer and the Child layer position changes to 0,0 or 0, 0, 0 for a 3D layer. Pickwhip moves the Problem layer to the same comp coordinates as the child layer, but that is not what you want:
Thinking that just subtracting the comp center seems like it might work:
But this fails if you move the child layer:
The solution is Layer Space Transformations. They will lock the problem layer to the child layer.
If you want to be able to move the problem layer and still have it follow the child layer you need to compensate for the comp center offset by subtracting the comp center from the current position value and then add the corrected child position:
Here's the fix all expression that works if the child layer is named "Child":
L = thisComp.layer("Child");
ChildPosition = L.toWorld([0, 0, 0]); // solves problem with 3D layers
// Position Fix
CmpCenter = [thisComp.width, thisComp.height]/2;
value - CmpCenter + ChildPosition
I have a version of this expression saved as an animation preset. I use it to create virtual child layers that do not respond to position, rotation or scale of a parent layer.
Copy link to clipboard
Copied
Thanks Rick. This expression works really well.
Copy link to clipboard
Copied
If you link to the position of a child layer, the link won't pick up the inherited movement. But you can track the anchor point of the child in comp space by using this expression in the position property:
target = thisComp.layer("child"); //select green text and pickwhip to your chosen layer
target.toComp(target.anchorPoint);