# Random rotation with geometry nodes

It is necessary to make the object constantly rotate randomly when the animation starts using "frame" python keyword (nothing bad if they are sharp jumps from one angle to another). In this regard, 2 questions:

1. Why doesn't my scheme work (what does the red line mean?)
2. How to do random rotation correctly?

You can solve this relatively easily with the help of the node Noise Texture:

Here I use Scene Time as base value and a very low value for Noise Scale.

The node Noise Texture produces values somewhere between $$(0,0,0)$$ and $$(1,1,1)$$, which I map with Map Range to a rotation range from $$-2\pi$$ to $$2\pi$$.

With this solution you get different rotations over your whole timeline without (visible) repetition.

you could e.g. use this node setup:

result:

The red line means: this connection is forbidden and won't do anything.

You connected a circle (one value) with diamond (means field value = multiple values). That's not allowed.

Note: GN as well as Blender inside always works with radians, not with degrees. So you won't be happy with random values from 0 to 360. Better take 0 to 2*pi.

if you want to transform just one object, use this:

The ID will be filled with a constant integer with transforms the field value of the random value node to a single value node.

UPDATE:

ok, here you are:

• This is closer to what I'm aiming for, but if you turn on the animation for a long distance, you can see a cyclic algorithm by which the object rotates, that is, it's not completely random rotation. Commented Jul 10, 2022 at 12:07
• i updated my answer - now with sharp jumps Commented Jul 10, 2022 at 13:20