PDA

View Full Version : how to do an expression convertin 180 to -180


schioler
02-09-2010, 04:02 PM
hi there..

i have this scene where a null object rotates the y axis..
the null is a parent to a picture.

no i want the picture to rotate the y axis too but not
excactly as the null ..

the null rotates y axis value let say 180 degrees.
now how to i put that value into the "picture" objects y rotation value..
but with a "minus" in front ..

Null object rotate y =180
child object rotate y = -180

u get me?

schioler
02-09-2010, 04:09 PM
Solved..

i put in "*(-1)" ;)
so the childs expression looks like:

thisComp.layer("Null").transform.yRotation*(-1)

PreatORiAn
02-10-2010, 08:24 AM
Or shorter still, just add a minus in front of the value ;)

looks like this:
-thisComp.layer("Null").transform.yRotation

schioler
02-10-2010, 09:10 AM
ahaaa thanx, never thought of that ;)

CGTalk Moderation
02-10-2010, 09:10 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.