IEnumerator OpenInCoroutine() { float fov = FOVModifier; for (float t = 0; t < 1; t += Time.deltaTime * effectSpeed) { transform.localPosition = Vector3.Lerp(transform.position, defaultPosition, t); transform.localRotation = Quaternion.Lerp(transform.localRotation, defaultRotation, t); fov = Mathf.Lerp(fov, 0, t); cameraEffector.ModifyCam(fov); yield return(null); } transform.localPosition = defaultPosition; transform.localRotation = defaultRotation; cameraEffector.ModifyCam(0); }
private void SetCameraModifier(float f) { currentCamModifier = f; destCamera.ModifyCam(currentCamModifier); }