Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Follow the Leader w/ elastic motion. . . follow-up

  • Follow the Leader w/ elastic motion. . . follow-up

    Posted by Darren Gardner on March 21, 2009 at 9:43 pm
    this was the final result from the earlier post:
    
    inertia = 0.01;
    stiffness = 1.10;
    
    lagValue = calcValue(0);
    f= thisComp.frameDuration;
    will=0;
    
    for (t=0; t<=time; t+=f) {
    delta = calcValue(t) - lagValue;
    will = will * inertia + delta*stiffness ;
    lagValue +=will
    }
    
    lagValue;
    
    function calcValue(t) {
    return thisComp.layer(index-1).position.valueAtTime(t-0.02)
    } 

    I found an earlier post explaining how to use the Follow the Leader expression and add springy/elastic motion to the followers when the leader comes to a stop. I’m a novice when it comes to complicated script and I couldn’t seem to make this work for me. The post is below:

    https://forums.creativecow.net/thread/227/7579#7583

    My question is: where do I apply the script? Do I put it in the Follow the leader code, or is it applied to a null layer? I’ve tried different things and I keep coming up short.

    Flip, if you’re around I’m sure you could help since its your script, but I’d be happy to hear any advice that comes my way.

    Thanks Flip and thanks again CCOW!

    Filip Vandueren replied 17 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    March 22, 2009 at 12:26 pm

    The expression should be added to the position of every follower.
    The script assumes the leader is exactly above the follower, nothing is parented.

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