Skip to main content
Participant
November 13, 2023
解決済み

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

  • November 13, 2023
  • 返信数 2.
  • 339 ビュー

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?

このトピックへの返信は締め切られました。
解決に役立った回答 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.

 

 

返信数 2

Dan Ebberts
Community Expert
Dan EbbertsCommunity Expert解決!
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.

 

 

samm81502974作成者
Participant
November 14, 2023

This worked perfectly! Thanks so much!