Reputation: 2873
In my game, you can move the camera either by using WASD or by holding a mouse button and moving the mouse. Similar for rotation and zoom - they all have both keyboard and mouse controls.
That's easy enough to set up in the new input system. I have set up three actions (move, rotate, zoom) and given them both mouse and keyboard bindings.
However, I'd like to configure sensitivity of the mouse. People have set their mice up differently. I know how to add a processor to the mouse binding to give mouse and keyboard different sensitivities using a scale processor.
I can't figure out how to access that processor in code to change it based on a player configuration option. I want to change ONLY the mouse scale processor, NOT the keyboard one - keyboard is just 1/0 so it's the same for everyone, but mice are configured differently and I want players to set their own MOUSE sensitivity.
I've read the documentation, various tutorials, the closest I found was this, but it refers to the whole action, not an individual binding: https://gamedevbeginner.com/input-in-unity-made-easy-complete-guide-to-the-new-system/#ineractions_and_processors
Upvotes: 2
Views: 5541
Reputation: 2873
Someone on the Unity forum pointed me in the right direction and posted a working solution that I could adapt to work for me:
Upvotes: 1