Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Velocity-based rotation?

  • Kevin Camp

    October 10, 2012 at 2:04 am

    yep… pretty much any key framed property will have velocity or speed, so an expression like this could be used to link one layer’s velocity to another’s rotation:

    L = thisComp.layer(“square”); // this is your square layer, or layer to take velocity from
    L.transform.position.velocity[0]/50;

    the expression looks only at x position, to look at y, change [0] to [1]; or z, change to [2].

    the 50 can be changed to any value to get the amount of rotation you need, 50 was kind of arbitrary on my end

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Dan Ebberts

    October 10, 2012 at 2:16 am

    I think this is what you’re asking for, but I doubt that it’s really what you want:

    factor = 50;
    vx = -thisComp.layer(“leader”).transform.position.velocity[0];
    vx/factor

    My guess is that you’re really looking for a more complex simulation that is based on acceleration, inertia, and overshoot.

    Dan

  • Navarro Parker

    October 10, 2012 at 6:50 pm

    That works amazingly well. But you’re right, I would like to soften out the rotation a bit. Would adding overshoot and dampening be overly complicated?

    (If this was Cinema 4D, I’d just throw on a Delay effector!)

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