using UnityEngine;
using System.Collections;
publicclass rotationTest : MonoBehaviour {
float speed = 0.1f;
private Quaternion end = new Quaternion(0.7f, 0, 0, 0.7f);
float time;
// Use this for initializationvoid Start () {
}
// Update is called once per framevoid Update () {
if (Input.GetKey(KeyCode.A))
{
transform.rotation = Quaternion.Lerp(transform.rotation, end, Time.time * speed);
}
}
}