randomize only the y axis orientation on a 3d layer

Moderators: Disciple, zlovatt

Post Reply
pwduffy
Posts: 3
Joined: April 23rd, 2010, 10:54 am

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
kobyg
Posts: 128
Joined: December 7th, 2007, 10:11 am

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
pwduffy
Posts: 3
Joined: April 23rd, 2010, 10:54 am

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
kobyg
Posts: 128
Joined: December 7th, 2007, 10:11 am

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.
pwduffy
Posts: 3
Joined: April 23rd, 2010, 10:54 am

i like that; i was thinking this:
transform.orientation[0,random(1),0]
thanks again
Post Reply