Jump to content

Randomize rotations within a value


samboosa

Recommended Posts

Hello all!

I have a grid of boxes which I want to rotate randomly but I want to limit to rotations to say 15 degrees and -15 degrees.

I know I could clamp the rotation between 345 degrees and 15 but this would be too erratic, what I want is for these boxes to jiggle basically.

This seems very simple but I just can't think of it, any ideas?

- Samboosa.

Link to comment
Share on other sites

you can write a simple expression for this:

(-15+(rand($PT)*30)),

something like this would do the trick

if you want to rotate over more axes:

(-15+(rand($PT+874)*30))

(-15+(rand($PT+411)*30))

just add different generic numbers for each axis

if you do this via copy stamping:

(-15+(rand(stamp("../copy1","copy",0)+411)*30))

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...