Rotation around the Z axis.

Hey, i’m new to unity and would like to know how to achieve stationary rotation for a rigid body along the

I tried this piece of code, but what happens is that it revolves and rotates. Can someone please help.

transform.Rotate(Vector3.forward, 5.0f * Time.deltaTime);

Thanks in advance!

Use AddTorque
http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.AddTorque.html

Didn’t work. It still revolves and rotates. I just want it to rotate.

Thanks!