Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions wiggle X and Y independently, alternate, pause and resume

  • wiggle X and Y independently, alternate, pause and resume

    Posted by Jordan Hull on October 26, 2023 at 12:03 am

    Is there a way to 1) wiggle x and y independently, 2) alternate between the two, 3) and have a brief pause in between? Keyframed example attached.

    I’ve searched extensively and found expressions that do some of these things individually, but I’m unable to combine all of these characteristics.

    Jordan Hull replied 2 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    October 26, 2023 at 2:27 am

    You could try something like this:

    freq = 1;
    amp = 500;
    period = 1;
    d = 3*period;
    seedRandom(index,true);
    t = time + random(d);
    n = Math.floor(t/d);
    p = t%d;
    if (p < period){
    tX = n*period + ease(p,0,period,0,1);
    tY = n*period;
    }else if (p < 2*period){
    tX = (n+1)*period;
    tY = n*period + ease(p,period,period*2,0,1);
    }else{
    tX = (n+1)*period;
    tY = (n+1)*period;
    }
    x = (wiggle(freq,amp,1,.5,tX)-value)[0];
    y = (wiggle(freq,amp,1,.5,tY)-value)[1];
    value + [x,y]
  • Dan Ebberts

    October 26, 2023 at 5:07 am

    This is a little better:

    freq = 1;
    amp = 600;
    period = 1;
    d = 3*period;
    seedRandom(index,true);
    t = time + random(d);
    n = Math.floor(t/d);
    p = t%d;
    if (p < period){
    tX = n*period + ease(p,0,period,0,period);
    tY = n*period;
    }else if (p < 2*period){
    tX = (n+1)*period;
    tY = n*period + ease(p,period,period*2,0,period);
    }else{
    tX = (n+1)*period;
    tY = (n+1)*period;
    }
    x = (wiggle(freq,amp,1,.5,tX)-value)[0];
    y = (wiggle(freq,amp,1,.5,tY)-value)[1];
    value + [x,y]
  • Jordan Hull

    October 26, 2023 at 6:21 pm

    Thank you, Dan!! This works like a charm!

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