Search Unity

how to temporarily stop/pause Cinemachine

Discussion in 'Cinemachine' started by canis, Sep 28, 2018.

  1. canis

    canis

    Joined:
    Oct 25, 2013
    Posts:
    79
    I setup the camera brain<CinemachineBrain> & free look module <CinemachineFreeLook>.
    everything working fine.
    however I would like to add a little feature to pause or temporarily stop the update of vCamera.

    right now I add another singleton script to get the active CinemachineBrain.
    and the CinemachineFreeLook that I'm using.
    when the time I need to pause, I set their component.enable to "false" at the same time.

    I wonder is there a better way to do it ?

    because If I only disable CinemachineFreeLook, the camera will jump to init position say Vector3(0,0,0); in this case.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Yes, the camera jumping to (0, 0, 0) when there is no active vcam is a bug in the current release. It has been fixed in the upcoming CM 2.2.8. In the meantime, deactivating the Brain as you have done is a good workaround.
     
    canis likes this.
  3. canis

    canis

    Joined:
    Oct 25, 2013
    Posts:
    79
    Thanks for your help.