Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Using slider control to animate the speed/rate of rotation.

  • Using slider control to animate the speed/rate of rotation.

    Posted by Gabriel Aronson on May 17, 2012 at 7:26 pm

    Hi everyone!
    This one’s got me and my colleagues stymied.
    Trying to create an expression (keyframable using a slider control) that will animate the speed of rotation on an object.
    The actual rotation value of the object is not as important to me as the RATE of rotation.
    I started something using time multiplied by a slider but my quandary is that when I set my slider to zero, I don’t want my rotation to go back to zero.
    I want it to stop rotating, to hold at that value.
    I tried creating some sort of identity switch using a second slider but got nowhere.
    Any help would be much appreciated!
    -Gabe

    Mathew Fuller replied 14 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Mathew Fuller

    May 17, 2012 at 8:28 pm

    This is the closet thing I have. It’s not exactly what you want… but it could be tweaked to do so.

    This generates perfect circular motion centered around the original position of the layer. I recommend that you map the radius and
    cycle inputs to Expression Control sliders, and the phase input to an Expression Control angle.
    Apply this expression to the position of the layer.

    radius = 75; // the radius of the circle
    cycle = 1; // number of seconds to complete a circle; higher value = slower
    if(cycle ==0){cycle = 0.001;} //avoids a “divide by zero” error
    phase = 27; // initial angle in degrees from bottom
    reverse = 1; // 1 for ccw, -1 for cw
    x = Math.sin( reverse * degrees_to_radians(time * 360 / cycle + phase));
    y = Math.cos(degrees_to_radians(time * 360 / cycle + phase));
    add(mul(radius, [x, y]), position)

    The higher they fly… the much.
    My Reel:
    https://www.youtube.com/watch?v=olElCddRiBg

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

    This happens because the functionality/content marked as “Google Youtube” 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.

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