Random Rotation all 3 Axes

Hey outta there,

I’m quite new to Unity3d. I want some cubes, which are moving from top to bot to rotate. Them should be given at their spawn one random rotation and speed, in all 3 axes and they should rotate with the random speed every frame. I’ve looked up in unity3d forum so many posts, but couldnt find exactly that and were also unable to build it up myself.

rigidbody.angularVelocity = Random.insideUnitSphere * tumble;

Rotations are really Quaternions, which can be built from x,y,z rotations. Ex: transform.rotation=Quaternion.Euler(0,45,0);. For an initial random spin, just toss in random #'s:

float xSpin = Random.Range(0,360); ... same for y and z
transform.rotation=Quaternion.Euler(xSpin, .... );

For continuous rotation, at least three ways. Either transform.Rotate(...); or alternately move the original vars: xSpin+=xSpinSpd; and then reset using the original command.

Or, toss in a rigidbody, at start set angularVelocity = new Vector3(smallRandom,...);, drop the angular drag to 0, and let Unity automatically spin it for you.