Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Make it Bounce from MotionScript?

  • Make it Bounce from MotionScript?

    Posted by Gabi Bucataru on February 19, 2014 at 10:19 pm

    Hi Gang!

    So I am confused about the Make it Bounce script from MotionScript. Do I need to create a position keyframe for each place where the ball touches the floor?
    Or are there only two position key frames for the start and end of trajectory?
    He mentions that “I’ve keyframed the movement of the ball across the bottom of the comp.
    Not sure exactly what he meant.

    The script:
    freq = 1.0; //oscillations per second
    amplitude = 90;
    decay = .5;

    posCos = Math.abs(Math.cos(freq*time*2*Math.PI));
    y = amplitude*posCos/Math.exp(decay*time);
    position - [0,y]

    thanks!
    gabi

    Gabi Bucataru replied 12 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 19, 2014 at 10:43 pm

    Wow-that’s an old one. It’s a very simplistic simulation that should only require two keyframes, but it’s not going to be very realistic. This one should give much better results:

    https://motionscript.com/articles/bounce-and-overshoot.html#bounce

    Dan

  • Gabi Bucataru

    February 22, 2014 at 4:23 am

    Dan!!

    What an honor to actually have the script creator answer you back! Thank you!
    Got it. And thanks for the new updated script! Indeed that one looks more realistic.

    I would dare asking you a question along sides this:

    How would you add a dashed line trailing the trajectory of the bouncing ball?

    thanks much again!
    gabi

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