I am using the new unity Input System, and I’m trying to switch my game to also work with a gamepad or keyboard mouse. In order for the aiming to work in my game, I had to add a virtual mouse component to my crosshair object and set it’s “cursor mode” to Hardware Cursor if available, because this will change the input.mousePosition. As detailed in the VirtualMouseInput script, using this will disable the actual cursor. It is possible to make it such that when my PlayerInput’s currentControlScheme switches back to keyboard, the virtual mouse is disabled and the real mouse becomes reenabled? I’ve looked for a while and have tried many things to get this to work.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Gamepad cursor sample: Adding switch between mouse/gamepad | 1 | 579 | April 7, 2022 | |
Virtual Mouse not working properly with CursorLockMode.Locked | 4 | 1216 | July 24, 2023 | |
UNITY_INPUT_SYSTEM_ENABLE_UI flag | 1 | 715 | September 23, 2021 | |
Disabling all Mouse inputs | 1 | 251 | August 23, 2023 | |
Virtual Cursor & Input | 5 | 1954 | March 12, 2018 |