Forum Replies Created

  • Sergej Mag

    February 20, 2017 at 7:54 pm in reply to: Linear play hold play

    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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy