Skip to main content
mdemeranville
Participant
May 19, 2025 7:10 PM UTC
Question

How to: Animate paths and maintain spacing and round cap

This is a speedometer. If the dial rotates left to right how can I maintain the spacing and the round cap as it moves?

3 replies

ShiveringCactus
Community Expert
Community Expert
May 20, 2025 9:50 AM UTC

I think you're going to need Trim Paths on each element and then the Linear expression to drive everything

 

Something like:

var angle = PICKWHIP_YOUR_DIAL_ANGLE;
linear(angle,0,180,0,100);

 

In the above, angle is driving the trim paths percentage.  When the angle is 0 degrees, the trim paths will be 0%.  At 180, the trim paths will be 100%.  And when the angle is 90 degrees, Trim Paths will be set to 50%.

But you'll have to adjust all the expressions for each element.  In some cases, you'll need to reverse the percentages to make it work.

Translate
mdemeranville
Participant
May 20, 2025 7:30 PM UTC

Thank you for your response. I got it work, not exactly how you suggested, but it helped me in the right direction.

Translate
ShiveringCactus
Community Expert
Community Expert
May 21, 2025 3:52 PM UTC

Oh, don't leave me hanging.  Can you post a gif / video of it in action (and ideally your solution)

Translate