Copy link to clipboard
Copied
I applied a Trim Path to a red line on a graph. I'd like to loop that animation. But when I do, the loopout function doesn't repeat like it should. The loop repeats the trim path at 4.2% into the animation when it should return to 0%. What could I be doing wrong? Thanks very much in advance for any help.
Copy link to clipboard
Copied
loopOut() accepts "mode" parameters such as "cycle", "offset" and "pingpong". If you offer no parameters, the default is "cycle", which yields the behavior you see. It seems you want it to be "pingpong". I suggest you read the relevant section of the online help on these details.
Mylenium
Copy link to clipboard
Copied
If you want a loop to be seamless, and the option is set to loop, then the first and last keyframes must be identical. If your two keyframes are Zero and 100, then move forward 1 more frame and set a keyframe for zero. That will make a perfect loop.
loopOut("pingpong") will reveal the line from the start to the end and back again if you keyframe the end value from 0 to 100.
The other options, continue and offset have no effect on trim paths if the start and end values are 0 and 100 because there is no place to go.
 
Copy link to clipboard
Copied
Thank you both very much Mylenium and Rick for your help. Actually, the pingpong effect was not what I wanted, but that could come in handy some day, thank you Mylenium. Rick, thanks for the tip about moving the zero keyframe forward a few frames, that did it! 😀