PDA

View Full Version : Random Constrained Movement on Y


andytroz
08-21-2007, 08:36 PM
I'd like to take a sphere and have it animated up and down on the Y axis between random values, yet never beyond the boundaries of 0 to 10.

What would a mel script look like for this process?

Robken
08-21-2007, 09:24 PM
pSphere1.ty = rand(0,10);

put that into an expression.

Derek Wolfe
08-21-2007, 10:02 PM
Or, for smooth transitions try:

pSphere1.ty = abs(noise(time))*10;

or:

pSphere1.ty = noise(time)*5+5;

CGTalk Moderation
08-21-2007, 10:02 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.