Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Disabling And Re-enabling Cinemachine POV Virtual CAM

Discussion in 'Cinemachine' started by Jack-Kheir, Aug 28, 2018.

  1. Jack-Kheir

    Jack-Kheir

    Joined:
    Apr 12, 2016
    Posts:
    3
    Hi, Is there a way that I can pause input to the virtual POV camera when locked in to an animation through code? And then resume input after animation has played?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Have a look at CinemachineCore.GetInputAxis(). Cinemachine calls that delegate to get its user input. By default it's set to Input.GetAxis(). Set the delegate to point to a function that calls Input.GetAxis() when you want input, or returns 0 when you don't.
     
  3. Jack-Kheir

    Jack-Kheir

    Joined:
    Apr 12, 2016
    Posts:
    3
    Perfect, thank you!
     
  4. aj_draws

    aj_draws

    Joined:
    Oct 4, 2021
    Posts:
    1
    Now with Unity's new input system you can add the Cinemachine Input Provider to the VCam. Enabling and Disabling this pauses input to the VCam.