Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Jack Parks on February 2, 2011 at 2:20 pm

    Hello

    I found these expressions here….

    https://vimeo.com/18960587

    But they create errors on line 6 then 12.
    I tried using the script editor but couldn’t fix the line 12 glitch.

    I’m trying to use it in cs4, any ideas would be appreciated.

    Thanks

    The text from vimeo

    This is code for bouncy position movement.
    Just paste it in the position expression field, in this case it will affect x, y and z movements:
    // Inertial Easing (elastically reacts to the speed at which it was animated)
    n = 0;
    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time){

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Vimeo framework” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Jack Parks replied 15 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 2, 2011 at 4:17 pm

    It looks like the minus signs got messed up. Try this:


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

    if (n > 0){
    v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
    amp = .02;
    freq = 3.0;
    decay = 5.0;
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

    Dan

  • Jack Parks

    February 3, 2011 at 8:51 pm

    Thanks, that did the trick.

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