3
$\begingroup$

I'm a beginner at Blender, and I was trying to make a Tetris themed thing. For it, I wanted to have each individual piece be randomly rotated 90, 180, 270, or 360 degrees on the Z axis. Is there any way I could do that? So far, I have these nodes, which get a random arrangement by position for the pieces, but not by rotation. I tried to plug in the "Value" from the Multiply Node into Rotation for "Instance on Points", which didn't work since it had each kind of piece for the 7 pieces rotate across the X, Y, and Z axes a random amount (i.e. all of the L pieces tilted the same random amount):

enter image description here

$\endgroup$
0

1 Answer 1

5
$\begingroup$

with this node setup:

enter image description here

you will get this:

enter image description here

How it works:

it generates a random number (integer) from 0 to 3.

This will be multiplied with pi/2 (which is 90 degrees in radians) and so you will always get an angle of 0, 90, 180 or 270 degrees.

$\endgroup$
3
  • $\begingroup$ I don't really know what to do here since blender.stackexchange.com/questions/230339/… is an exact duplicate but the solution I provided isn't relevant anymore with the fields workflow. Maybe repost your answer there too and link the two Q&A? But +1 of course $\endgroup$
    – Gorgious
    Commented Mar 25, 2022 at 7:06
  • $\begingroup$ @Gorgious: i added it to your question so everything is in one place...makes more sense to me. And maybe you got even more reputation ;) Hope that's fine with you. $\endgroup$
    – Chris
    Commented Mar 25, 2022 at 7:27
  • 1
    $\begingroup$ Sure that's alright thanks ! You got me a bronze badge actually ^^I just moved your fields solution first because I think the 2.9 solution will be less and less relevant in the future. Cheers $\endgroup$
    – Gorgious
    Commented Mar 25, 2022 at 7:39

Not the answer you're looking for? Browse other questions tagged .