View Full Version : Problem / Random rotation on selected objects
03-01-2004, 05:35 PM
Hi, I am trying to create a script which allows selected objects
to rotate randomly. I managed to get the random rotation going
but all objects are rotating at the same angle. What I want is
to make all seleced objects rotate in different angles
sarr = selection as array
count = sarr.count + 1
i = 1
while i < count do
rotate $ (eulerangles (random 0 360) (random 0 360) (random 0 360))
i += 1
I'm not very good at MAXScript, but you can use this script to rotate all selected objects in a random way.
for x in selection do
rotate x (eulerAngles (random -360 360) (random -360 360) (random -360 360))
The code posted by KaMe needs to have the the object selected to work. This will slow the process down allot as selections have to keep changing.
Yeah thats true when you have a lot of objects in the scene...
Your script is much simplier and much faster. I didn't know of this MAXScript 'ability', really good to know. :]
01-17-2006, 03:00 PM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.