Skip to main content
Participant
November 13, 2023
Answered

How would I go about animating text to follow next to the end of a trim path that's changing scale?

  • November 13, 2023
  • 1 reply
  • 329 views

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?

This topic has been closed for replies.
Correct answer Dan Ebberts

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.

 

 

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
November 13, 2023

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.

 

 

Participant
November 14, 2023

This worked perfectly! Thanks so much!