FORUMS: list search recent posts

flipping positive for negative from rotation controller

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike roberts
flipping positive for negative from rotation controller
on Mar 4, 2014 at 2:26:52 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??


Return to posts index

Mike roberts
Re: flipping positive for negative from rotation controller
on Mar 4, 2014 at 2:48:54 am

I DONE FIGURED IT OUT!

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

is there a better way??


Return to posts index

Dan Ebberts
Re: flipping positive for negative from rotation controller
on Mar 4, 2014 at 3:23:37 am

That's how I'd do it.

Dan



Return to posts index


Mike roberts
Re: flipping positive for negative from rotation controller
on Mar 4, 2014 at 5:27:20 pm

Thanks Dan!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]