Page 1 of 1

randomize only the y axis orientation on a 3d layer

Posted: April 23rd, 2010, 1:18 pm
by pwduffy
I have a graphic on a 3D layer and all I want to do is randomly rotate the Y axis of its orientation over time so it looks like its spinning in 3D space. Any help and/or insight to this would be appreciated. I expect this is very simple, but not for me..thanks

Re: randomize only the y axis orientation on a 3d layer

Posted: April 23rd, 2010, 1:34 pm
by kobyg
If you want a random Y rotation, you could add a wiggle expression to the Y-Rotation property, something like:
wiggle(0.5,180)
the first argument (0.5) controls the speed of the randomness and the second argument (180) controls the min/max possible change value.

Koby

Re: randomize only the y axis orientation on a 3d layer

Posted: April 23rd, 2010, 1:53 pm
by pwduffy
thank you for that, however, I'm trying to change the y value of the orientation...
I don't know how to specify in the expression how to keep the x and z value of the orientation the same while randomizing the y value

Re: randomize only the y axis orientation on a 3d layer

Posted: April 23rd, 2010, 3:37 pm
by kobyg
In that case, you could use something like this for the orientation expression:

w = wiggle(0.5,180);
[value[0], w[1], value[2]]

Koby.

Re: randomize only the y axis orientation on a 3d layer

Posted: April 23rd, 2010, 4:03 pm
by pwduffy
i like that; i was thinking this:
transform.orientation[0,random(1),0]
thanks again