I had a similar situation. I had to repeat the movement and the occasional long pauses. Maybe my expression is useful to you.
and see more random rotation with accumulating loop
Sorry for my English!
segMin = 2.5; //minimum segment duration sec
segMax = 5; //maximum segment duration sec
runDur = 1.5; // run duration
oldPos = 2380; // x position start
newPos = -500; // x position end
yPos = 0; // y position
end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
if (time > end - runDur)
{
seedRandom(j,true);
y = random(0,1080);
linear(time,end-runDur,end,[oldPos,y],[newPos,y])
}else{
seedRandom(j,true);
y = random(0,1080);
[newPos, yPos+y]
}
==================================
// random rotation with accumulating loop
j = 0; //initialize loop counter
accum = 0; //initialize random accumulator
seedRandom(index,true)
while (j < time){
accum += random(10);
j += thisComp.frameDuration;
}
rotation + accum