Hello,
I have a controller that sends its data (position, buttons clicked etc.) to my Unity game via VRPN. Indeed, the controller collects the data on a computer different than the computer on which the game runs.
I use UVRPN for this, which gets the raw data, and fire some events accordingly. E.g. I subscribe to OnButtonDown(int x) to know when the button x was pressed/held/etc. And then my scripts do what they have to, let’s say for instance change the material of the object currently targeted. Ok, that works.
Now, my problem is the menus. When I hover a UI button and click with my controller, the OnClick() event of the button is of course not triggered, like it would automatically be the case if I was using my mouse directly.
My question is: how do I do this the right way? How do I somehow re-wire my vrpn data to Unity’s Input system?
I was initially using the legacy input system, but I recently found that maybe going with the new Input System was the right path (plus migrating to the new input system can’t be bad anyways). I thought of this because I saw the example for “creating a custom device” here.
Is it the right way of doing it? Will this achieve what I want?
Hopefully I managed to be clear enough
Thanks a lot for any confirmation or lead!
Arnaud