Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions simple position expression!

  • simple position expression!

    Posted by Eric Braff on July 17, 2008 at 5:05 pm

    Hi..

    Thank you for having a look at this…
    what I am looking for is an expression like some flash sites can do. When you move something it seems to have its own velocity, like it might keep moving and slow down on its own..

    kind of like the bounce expression… how you can adjust the amp, freq, and decay…. but just for the position of lets say X!

    Well thank you so much, always grateful!

    Eric

    Eric Braff replied 17 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 17, 2008 at 9:01 pm

    I’m not sure what you’re after exactly, but this expression will oscillate at the last keyframe. It won’t do anything unless you have at least two keyframes.

    n = numKeys;
    if (n >= 2){
    v = velocityAtTime(key(n).time – .001);
    freq = 1.0; //oscillations per second
    elasticity = .6;
    decay = 2.0;
    t = time – inPoint;
    value + v*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)
    }else{
    value
    }

    You might have to play with the frequency, elasticity, and decay parameters.

    Dan

  • Eric Braff

    July 17, 2008 at 10:43 pm

    Thank you Mr. Ebberts!
    so grateful!

    e

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