Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions rotate number of degrees in specified time

  • rotate number of degrees in specified time

    Posted by Riccardo Sinti on May 27, 2009 at 7:52 pm

    this must be so simple but I can’t figure it out.
    how do I write an expression to tell a layer to rotate, for example, 45 degrees in 2 seconds.
    I would like to do it in a way that uses a variable for time and rotation.
    thanks

    Dan Ebberts replied 17 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Riccardo Sinti

    May 27, 2009 at 7:58 pm

    I meant to say that the rotation should stop at 45 degrees, not continue to rotate 45 degrees for very 2 secs.

    Thank You

  • Dan Ebberts

    May 27, 2009 at 8:02 pm

    This should rotate your layer 45 degrees over 2 seconds, starting from the layer’s in point:

    rotationDuration = 2;
    rotationAmount = 45;
    rotationStart = inPoint;

    linear(time,rotationStart,rotationStart+rotationDuration,value,value+rotationAmount)

    If you want a different start time, just edit the third line.

    Dan

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