Problem / Random rotation on selected objects

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  03 March 2004
Problem / Random rotation on selected objects

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
Shoot first, Ask question later
  03 March 2004
Quote: sarr = selection as array
count = sarr.count + 1
i = 1
while i < count do
select sarr[i]
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.
  03 March 2004
Or Simplier.

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.
Paul Neale
  03 March 2004
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 January 2006
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:37 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.