-
Anchor point of a shape layer atttached to vertex of path
Hello, I’m trying to create a text label that follows an element in video footage by tracking. The text is linked to a path that points to the element. I find myself changing the shape of that path to better suit the video when I create copies of the label for other elements. This means I have to manually change the anchor point of the shape layer every time I change the path since the animation of it it’s supposed to come from the origin of the path.
I found a tutorial to link a null to a vertex of a path of a shape layer and tried to apply it directly to the anchor point but it didn’t work, I then tried to apply it to a null that would control the path but it also didn’t work. The ideal is I can apply the code to the anchor point so I don’t have to deal with another layer. Can you please help me find where I’m failing?Thank you.
p = thisComp.layer("line").content("Shape 1").content("Path 1").path;
l = thisComp.layer("line");
l.toComp(p.points()[0])
