Looping Wiggle
Over the years of working on these projects I found and adpated an expression that made it a lot easier to animate random elements: Looping Wiggle. It operates as a normal wiggle, but rewinds mid way and uses the layers in points an out points as the timer. Super easy to use.
Just change the values in frequency and amplitude on the first two lines to adapt it to the speed you want.
freq = .5;
amp = 25;
loopTime = (thisLayer.outPoint – thisLayer.inPoint);
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
wiggle2 = wiggle(freq, amp, 1, 0.5, t – loopTime);
linear(t, 0, loopTime, wiggle1, wiggle2)
Should it be:
(loopTime = thisLayer.outPoint – thisLayer.inPoint);