Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions scale bounce in one direction x or y

  • scale bounce in one direction x or y

    Posted by Jose Arce on July 16, 2011 at 11:40 pm

    Hi, several year ago I posted about how to make a scale bounce, and Mr. Dan Ebberts send me this great expression, I abuse it a lot, and now I need to move it in only one direction, x or y. this is the expression.

    Thanks

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n--;
    }
    }

    if (n == 0){
    value;
    }else{
    maxDev = 10; // max deviation in pixels
    spd = 10; //speed of oscillation
    decay = 3.0; //how fast it slows down

    t = time - marker.key(n).time ;
    x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
    y = x;

    [x,y]

    }

    Jose Arce replied 15 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 17, 2011 at 12:42 am

    Just change:

    [x,y]

    to:

    [x,value[1]]

    That should do it.

    Dan

  • Jose Arce

    July 17, 2011 at 1:29 am

    Thanks.
    I figure out the effect in Y position just I need to change the value in
    [x,value[1]] to [value[2],y], nop don’t work…couse is 0 no 2..

    Kind regards

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