Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Arm Rotate with Sleeve Rotate Delayed

  • Arm Rotate with Sleeve Rotate Delayed

    Posted by Ginger O’toole on June 1, 2020 at 1:17 am

    Hi.
    I have been trying to create an arm rotation expression where;
    as the arm appears to hit the sleeve in either direction, the sleeve only then begins to rotate with it.
    I have 2 layers ARM and SLEEVE – the arm rotating left hits the sleeve at +9 and going right hits the sleeve at -13.
    So I needed an expression for the SLEEVE layer to say “begin rotating with the ARM layer beyond +9 and beyond -13 (minus the difference so the sleeve doesn’t jump) and in between those values, to keep its rotation at zero.

    I was using all kinds of if/else combinations and was getting nowhere, it would only work on one side at a time, but I got this purely by accident as I am only learning the expressions and can’t fully explain how its working and hope it’s a good code… but somebody else might find it useful.

    var r = thisComp.layer(“ARM”).transform.rotation;

    if(r>9){
    thisComp.layer(“ARM”).transform.rotation-9;
    }else{
    0;
    };
    if(r<-13){ thisComp.layer("ARM").transform.rotation+13; };

    Ginger O’toole replied 6 years, 2 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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