How can i rotate rigidbody smoothly at a constant speed on the xz plane?
1 Answer
1function 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
var speed = 90.0; function Update() { transform.Rotate(0.0, Time.deltaTime * speed, 0.0); }
– robertbuwill that rotate a rigidbody with a rigidbody child?
– CookieKirby