using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityStandardAssets.Characters.FirstPerson; public class RotateObject : MonoBehaviour { public float turningRate = 1; void Awake() { fpcscript = transform.GetComponent<FirstPersonController>(); fpcscript.enabled = false; } void Update() { transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.Euler(0, 0, 0), turningRate * Time.deltaTime); } } Using Lerp make it rotating but with some stuttering when rotating it's not so smooth.
I also tried first to use Quaternion.RotateTowards instead Lerp but it was too slow and not smooth either.