Copy link to clipboard
Copied
Hi there!
I'm trying to figure out a way to have text on a graph follow the end of a line that's changing scale. The line is animating on through trim paths, and I need the text to follow it, as a label for the line essentially. I need the text to stay the same dimensions as well.
I'm relatively new to After Effects, so I'm not too familiar with expressions. Is there an easy way to do this that I'm missing?
Assuming that you're animating the End property of your Trim Paths and that your line is actually a path, something like this should get you close:
offset = [50,20];
L = thisComp.layer("Shape Layer 1");
p = L.content("Shape 1").content("Path 1").path;
pct = L.content("Shape 1").content("Trim Paths 1").end/100;
L.toComp(p.pointOnPath(pct)) + offset
Where offset determines how close to the end of the line the text stays.
Copy link to clipboard
Copied
Assuming that you're animating the End property of your Trim Paths and that your line is actually a path, something like this should get you close:
offset = [50,20];
L = thisComp.layer("Shape Layer 1");
p = L.content("Shape 1").content("Path 1").path;
pct = L.content("Shape 1").content("Trim Paths 1").end/100;
L.toComp(p.pointOnPath(pct)) + offset
Where offset determines how close to the end of the line the text stays.
Copy link to clipboard
Copied
This worked perfectly! Thanks so much!