Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Circular motion y axis and stop it

  • Circular motion y axis and stop it

    Posted by Ismael Millán on June 22, 2015 at 4:49 pm

    When i animate the rate from value to 0, the motion is backward, i wont stop it, any help?
    (sorry my english)

    The position expression:

    radius=effect(“Radio”)(“Slider”);
    rate=effect(“Frecuencia”)(“Slider”);
    offset=effect(“Offset”)(“Slider”);
    angle=time*rate+offset;
    x=radius*Math.cos(degreesToRadians(angle));
    y=transform.position[1];
    z=radius*Math.sin(degreesToRadians(angle));
    centre=thisComp.layer(“Null 1”).transform.position;
    add(centre,[x,y,z])

    Adobe After Effects Expressions

    Ismael Millán replied 11 years, 2 months ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    June 22, 2015 at 5:29 pm
  • Ismael Millán

    June 22, 2015 at 7:49 pm

    Thanks Mr. Ebberts

  • Ismael Millán

    June 23, 2015 at 8:24 am

    Buf, i can’t combinate both expressions…

  • Dan Ebberts

    June 23, 2015 at 6:56 pm

    I haven’t tested this, so it may not be quite right, but it would be something like this:


    radius=effect("Radio")("Slider");
    spd = effect("Frecuencia")("Slider");
    offset=effect("Offset")("Slider");
    n = spd.numKeys;
    if (n > 0 && spd.key(1).time < time){
    accum = spd.key(1).value*(spd.key(1).time - inPoint);
    for (i = 2; i <= n; i++){
    if (spd.key(i).time > time) break;
    k1 = spd.key(i-1);
    k2 = spd.key(i);
    accum += (k1.value + k2.value)*(k2.time - k1.time)/2;
    }
    accum += (spd.value + spd.key(i-1).value)*(time - spd.key(i-1).time)/2;
    }else{
    accum = spd.value*(time - inPoint);
    }
    angle = accum + offset;
    x=radius*Math.cos(degreesToRadians(angle));
    y=transform.position[1];
    z=radius*Math.sin(degreesToRadians(angle));
    centre=thisComp.layer("Null 1").transform.position;
    add(centre,[x,y,z])

    Dan

  • Ismael Millán

    June 24, 2015 at 7:48 am

    OOOoooo, Thanks for your quick reply, always helping.

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