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 CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2004   #1
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
 
Old 03 March 2004   #2
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.
 
Old 03 March 2004   #3
Or Simplier.

<code>
for x in selection do
(
rotate x (eulerAngles (random -360 360) (random -360 360) (random -360 360))
)
</code>

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
http://paulneale.com
 
Old 03 March 2004   #4
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. :]
 
Old 01 January 2006   #5
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 04:21 PM.


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