Q:

rotation over time unity

      public float smooth = 1f;      private Quaternion targetRotation;      void Start(){               targetRotation = transform.rotation;      }            void Update () {          if (Input.GetKeyDown (KeyCode.Space)) {               targetRotation *=  Quaternion.AngleAxis(60, Vector3.up);          }          transform.rotation= Quaternion.Lerp (transform.rotation, targetRotation , 10 * smooth * Time.deltaTime);       }
0

New to Communities?

Join the community