I basically want to disable the mouse when a gamepad is connected.
I don’t want to lock or hide the cursor. I want there to be ZERO input from the mouse. If the cursor is locked it will interfere with the gamepad’s input setup.
Am I able to disable the mouse through script? Perhaps re-enable it later?
Create a bool to hold if the gamepad is connected, and if it is, don’t read from mouse, read from gamepad.
Or if you want it from InputActions asset, just create a Mouse ActionMap, ad then Enable to Disable according to your needs.
Just came back to say I found it more valuable to detect whether the controller is active. If so, I don’t check mouse controls. Fairly simple, but because I’m using Rewired I still needed to learn some more about the namespace.for Rewired. Have it working fine.
If you use rewired and you want to completely disable mouse input. Don’t forget to uncheck “Allow Mouse Input” in the Rewired Standalone Input Module. Else the mouse clickes are still registered by the Input module and will for example reset the current selection in the Event System.