Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions flipping positive for negative from rotation controller

  • flipping positive for negative from rotation controller

    Posted by Mike Roberts on March 4, 2014 at 2:26 am

    Hey guys,

    I have a null with the y position being affected by the rotation. when you rotate the null into the negative, the y position moves down… very simple:

    value – transform.rotation*5

    what i need is something in there so that when the rotation is positive, the expression changes to:

    value + transform.rotation*5

    To try and explain further – i want the y position to go down the same amount when the angle of the rotation is at +15 or -15, 0 degrees being the highest point.

    Is that doable??

    Mike Roberts replied 12 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Mike Roberts

    March 4, 2014 at 2:48 am

    I DONE FIGURED IT OUT!

    value + (Math.abs(transform.rotation*5))

    is there a better way??

  • Dan Ebberts

    March 4, 2014 at 3:23 am

    That’s how I’d do it.

    Dan

  • Mike Roberts

    March 4, 2014 at 5:27 pm

    Thanks Dan!

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