I know similar questions have been asked already but I’ve been through almost all of them and none of the solutions seem to work for me. Basically I have a camera that pans to a predefined location when the mouse button is clicked, which works fine minus the somewhat subtle jitter.
static var cameraPosition : int;
function Update () {
if (cameraPosition == 1) {
transform.position = Vector3.Slerp (transform.position, target.transform.position, Time.deltaTime);
transform.rotation = Quaternion.Slerp (transform.rotation, target.transform.rotation, Time.deltaTime);
}
}
I’ve tried used function FixedUpdate and replacing Time.deltaTime with 1 - Mathf.Exp(-k * Time.deltaTime) but to no avail. The jitter exists for both the rotation and position. Any ideas?