Search Unity

Question Click and drag camera with Input System and Cinemachine

Discussion in 'Input System' started by CrocusBagel, May 20, 2022.

  1. CrocusBagel

    CrocusBagel

    Joined:
    May 9, 2022
    Posts:
    1
    I would like to disable my camera look around controls whenever my mouse is pressed. or disable when the mouse is not pressed. However using `.Disable()` on my camera look controls does not work and the camera moves weather the input is disabled or not.

    I have found very few examples of this, and most suggest making your own script attached to the camera, however none have provided any example code. I'm still pretty new, so I might be missing something super obvious.

    It might make sense to intercept an InputReferenceProvider and change the value of the inputs to zero when the mouse is not pressed and feed that into a Cinemachine Input Provider component? Although I don't know how to do that.
     
    Pheonix1202 and bobobee_xr like this.