-
animated leader dot on trim path
I thought I’d share a solution since this is an annoying thing to do. There are quite a few solutions out there, but none of them are perfect because they require you do things in a specific order. So you can’t decide to change something later easily.
I had an animated path using trim paths. In case you don’t know, on your path, next to contents you say “Add” trim path. Then you can animate the beginning and end. It’s based on percentage of the length of path.
Then I decided I wanted a leader on it….but After all the animation was finished. Usually for a leader (and it’s usually an arrow head in most examples) you animate the arrow, Then copy the animation keys to path keys. But this is the other way around. Also, that’s not flexible, because it’s not linked, so you can’t change it without doing it again.
SO….
Duplicate the shape
Change the stroke width to be much thicker, that will be your dot diameter.
Change to RoundCap if it isn’t already.
And on trim paths, create an expression to be the same as your first one.
for beginners, hold Alt and click on the stopwatch. Then use the pickwhip (the swirl icon) and drag it to the other trim path Start text.
Now subtract a Tiny amount. I used .001. So just add “- .001” after the __).end
Do the same thing for the End, but with no subtraction. End should just equal your previous trim path start.Essentially, you’re creating a new line that’s Really short, on top of your other line, using the same path. If you want it to be editable, you should also add an expression to make the dot path the same as the animated line path. Same technique. Just add an expression and pickwhip it to the other path.
That’s it. You’ll have a dot that always leads the animated line. You could also change the .001 to something longer to have a short thick line lead it. I’m not going to tell you what to do.
Now if someone has a great way of attaching an object to the position of the trim path head, I’m all ears. That’s the way I prefer to do it, because if you change the speed of the object leader animation, it’s difficult to match the speed of the trim path.