- Home /
Question by
Anno_Elite · Dec 19, 2019 at 12:48 AM ·
cameracamera movement
Cinemachine screen shake not returning to original position
I'm trying to use the cinemachine impulse listener/collision impulse source to create some screen shake effects but the shakes move and rotate the camera and don't return it to its original position when the shake has finished. After a few shakes the camera is in a completely unusable state. Is there some setting I can change or a simple script that would resolve this?
Comment
Answer by livium · Jan 11, 2020 at 09:38 AM
I have the same problem.
it works for me using a Coroutine.
public Cinemachine.CinemachineVirtualCamera vCam;
public void CameraReset()
{
StartCoroutine("CameraRestIE");
}
IEnumerator CameraRestIE()
{
yield return new WaitForSeconds(1f);
vCam.enabled = false;
vCam.transform.SetPositionAndRotation(new Vector3(40.99304f, 22.67594f, 5.166766f), Quaternion.Euler(36.892f, -90.44701f, 0.233f));
vCam.enabled = true;
}
Your answer
Follow this Question
Related Questions
Camera Follow a Target, but not Centered on it 1 Answer
How to change the focus of the camera? 0 Answers
camera follow gameobject moving in angular path. 0 Answers
How to pan the camera depending on the zoom 1 Answer
Camera follow players z axis 0 Answers