-
Change Random Motion To Specific Postion
Hey guys.
I’m currently producing a nifty little background with squares flying round the screen in random motion. My problem is that after 35 secs I need the squares to go to specific positions on the screen.
This is the code I have used to do the random motion gained from the awesome Motionscript.com inserted into the position property:
segDur = 12;// duration of each “segment” of random motion
minVal = [0.1*thisComp.width, 0.1*thisComp.height];
maxVal = [0.9*thisComp.width, 0.9*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);What I have been trying to do is add a couple of lines of code that says whilst the time is less than 35secs use the random motion code, after 35secs move into your final position.