How can i smoothly rotate a gameobject

How can i rotate rigidbody smoothly at a constant speed on the xz plane?

var speed = 90.0; function Update() { transform.Rotate(0.0, Time.deltaTime * speed, 0.0); }

will that rotate a rigidbody with a rigidbody child?

1 Answer

1

function FixedUpdate ()
{
transform.eulerAngles = Vector3(0, 0, 0);
}

Change the zeros to set the speed of rotation, the FixedUpdate makes sure you get a constant speed