Quantcast
Viewing all articles
Browse latest Browse all 133

Lerping Quaternion Eulers.

Is there anyway to Lerp/Slerp these values so that it takes time to reach them, and it isn't just instant. Vector3 dir = target.transform.position - turretBase.transform.position; Vector3 dir1 = target.transform.position - turretGun.transform.position; Quaternion lookRot = Quaternion.LookRotation(dir); Quaternion lookRot1 = Quaternion.LookRotation(dir1); turretBase.transform.rotation = Quaternion.Euler(0, lookRot.eulerAngles.y, 0); turretGun.transform.localRotation = Quaternion.Euler(lookRot1.eulerAngles.x, 0, 0);

Viewing all articles
Browse latest Browse all 133

Trending Articles