Copy link to clipboard
Copied
I found the solution after digging in more with a code.
Add this to the position property. It will use layer A (1 layer above layer B) to offset position based on a layer A's height and width.
boxHeight = thisComp.layer(index-1).sourceRectAtTime().height;
boxWidth = thisComp.layer(index-1).sourceRectAtTime().width;
thisComp.layer(index-1).position + [-boxWidth/2,boxHeight*1.3];
Copy link to clipboard
Copied
I found the solution after digging in more with a code.
Add this to the position property. It will use layer A (1 layer above layer B) to offset position based on a layer A's height and width.
boxHeight = thisComp.layer(index-1).sourceRectAtTime().height;
boxWidth = thisComp.layer(index-1).sourceRectAtTime().width;
thisComp.layer(index-1).position + [-boxWidth/2,boxHeight*1.3];