-
After Effects random position as a loop
I am trying to animate a line that moves randomly in the Y direction. This is easy enough but the problem is that I need the start and end frame to be the same so that the result is a constant loop. The code I have so far is
segDur = .5;
minVal = [64,0];
maxVal = [64, thisComp.height];seed = Math.floor(time/segDur);
segStart = seed*segDur;
seedRandom(seed,true);
startVal = random(minVal,maxVal);
seedRandom(seed+1,true);
endVal = random(minVal,maxVal);
ease(time,segStart,segStart + segDur, startVal, endVal);Any help is appreciated