Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Continuous bounce

  • Posted by Kostas Bartsokas on May 15, 2014 at 7:14 pm

    Hi to all.

    I am quite new to expressions. I am creating an animation with a sign hovering over a persons head. I want the sign to bounce continuously (with Inertia) and perhaps rotate a bit to either side. I have found the Inertia Bounce expression but I couldn’t get it to work, cause it always stops after a few bounces.

    Could anyone help?

    Thanks in advance.

    K.

    Kostas Bartsokas replied 12 years, 4 months ago 2 Members · 3 Replies
  • 3 Replies
  • Kevin Camp

    May 15, 2014 at 8:33 pm

    for position you could use something like this:
    freq = 1; //bounces per second
    amp = 100; //bounce height in pixels

    y = Math.sin(time*Math.PI*freq)*amp/2;
    value + [0,y]

    it will cause a layer to continually bounce in an elastic fashion.

    if you needed a hard bounce (like a ball bouncing off the ground), you could change the third line to this:
    y = Math.abs(Math.sin(time*Math.PI*freq))*amp;

    for rotation, since you could use the same expression but change the last line to this
    value + y

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Kevin Camp

    May 15, 2014 at 8:34 pm

    also, if you want more info on expression like these, you can find more on them at motionscript.com.

    these were based on the expression found here:
    https://www.motionscript.com/mastering-expressions/simulation-basics-3.html

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

  • Kostas Bartsokas

    May 16, 2014 at 6:19 am

    Hi Kevin

    it worked like a charm!! Thank you very much! I’ll have a look at Motionscript.

    Thanks!

  • Viktor Vaughn

    January 5, 2021 at 3:27 pm

    Hi Kevin,

    Is there any way to randomise the freq or amp to parimeters i can set?

    Much appreciated

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