Skip to main content
Participant
January 21, 2023
Question

How to align pasted effect coordinates to target anchor point

  • January 21, 2023
  • 1 reply
  • 206 views

I have created a new composition and inserted a video. I used the face track feature and I have now Face track coordinates.

The anchor point of the video layour is set to 320;180.

 

I added a picture to a new layer. It is different size and has a different anchor point (it is still in the center of the composition). It's anchor point is 203;175

 

When I copy the face track points, they have the coordinates of the original video (and I guess use it's anchor point). So when I paste it, the face track coordinates are way off in the picture.

 

How can I align the copied values to consider the actual anchor point?

This topic has been closed for replies.

1 reply

Mylenium
Legend
January 21, 2023

Such stuff requzires to use the toComp() and fromComp() layer space transforms to convert coordinates from layer to comp and back or you manually add/ subtract values. hard to say what exactly needs to happen based on such incomplete info. Here's something that explains the basic drill:

 

mA=thisComp.layer("A");
mB=thisComp.layer("B");

mPosA=mA.transform.position;
mAncA=mA.transform.anchorPoint;
mPosB=mB.transform.position;
mAncB=mB.transform.anchorPoint;

X=mPosB[0]-mPosA[0]+mAncB[0]-mAncA[0];
Y=mPosB[1]-mPosA[1]+mAncB[1]-mAncA[1];

[X,Y]

 

Making this up on the go, so no guarantees for typos or correctness, but I hope you get the idea. Just play around with it.

 

Mylenium