void LateUpdate() { float value = cam.GetZoom(); float newScale = Mathf.Lerp(0.25f, 0.05f, value); transform.localScale = new Vector3(newScale, newScale, newScale); float rotY = unit? cam.GetRotation() - unit.transform.localEulerAngles.y : cam.GetRotation(); float rotX = Mathf.LerpAngle(90, 25, value); transform.localEulerAngles = new Vector3(rotX, rotY, transform.eulerAngles.z); }