Search Unity

How to disable certain axis or button input when using Rewired

Discussion in 'General Discussion' started by Wayne-wyj1994, Feb 16, 2020.

  1. Wayne-wyj1994

    Wayne-wyj1994

    Joined:
    Nov 13, 2019
    Posts:
    30
    I use rewired integration for CineMachine,and set Rewired action to cinemachine axis.
    Now, I want to disable this In cutscenes.So,how should I do to disable it? Does anyone know this issue?
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,631
    You can do it the exact same way you do it when you're not using Rewired:
    https://docs.unity3d.com/Packages/com.unity.cinemachine@2.2/manual/CinemachineFreeLook.html

    Input Axis Name The name of this axis as specified in Unity Input manager. Setting to an empty string disables the automatic updating of the axis.

    Input Axis Value The value of the input axis. A value of 0 means no input. To drive this directly, use a custom input system. Or you set the Axis Name to control the value with the Unity Input Manager.

    https://forum.unity.com/threads/how-can-i-disable-mouse-axis-input-on-freelook-camera.607849/

    While it seems to be odd to me, this appears to be their design of how you should flow control input in Cinemachine.

    There is no need to use it for this purpose, but if you want to flow control input with Rewired, you do it like you do for any other use case in Rewired:
    https://guavaman.com/projects/rewired/docs/HowTos.html#enabling-disabling-controller-maps