Forum Discussion
molton
12 years agoExplorer
anybody know of any Unity DirectInput support plugins?
Hello, I've been putting off adding controller input to my game because I am hugely in favor of using good ol directinput for handling controllers instead of the new xinput that only supports Microsoft wired controllers. For some reason I thought I read that 0.4.1 somehow added support for directinput controllers but I guess that was just wishfull thinking. I'm going to give in and finally purshase an xbox360 controller already I think, unless somone on here knows of a good directinput solution for Unity games.
I suppose I could have an installer load x360ce up for direct input support, but that would deffiently be too complicated for the average user to have to do and might not be too easy to automate.
http://code.google.com/p/x360ce/
I really hate how Microsoft decided to abandon all game controller input devices that are not made by microsoft, I'd really rather my software support all controllers, not just new microsoft ones.
edit: does anybody know if slimdx works with unity?
http://slimdx.org/
I suppose I could have an installer load x360ce up for direct input support, but that would deffiently be too complicated for the average user to have to do and might not be too easy to automate.
http://code.google.com/p/x360ce/
I really hate how Microsoft decided to abandon all game controller input devices that are not made by microsoft, I'd really rather my software support all controllers, not just new microsoft ones.
edit: does anybody know if slimdx works with unity?
http://slimdx.org/
3 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffUnity actually uses DirectInput internally and it has some limited support for the 360 controller. The Oculus integration bypasses that and uses XInput on Windows (and IOKit on Mac with the same mappings).
- AnonymousWe are using cInput, which is nothing but a fancy wrapper for Unity's own system really.
It does work, but it depends on device enumeration. Unity (and therefore cInput) store mapping values by the device id, starting from "Joystick 1" to "Joystick 4". If the enumeration changes (will almost always happen once you restart windows), your mapping is wrong.
This is especially bad for complicated setups with multiple devices like a HOTAS and pedals.
We wrote another wrapper for cInput, which enumerates joysticks by name and changes the cInput mapping accordingly. If you need more info on that, hit me up via PM. We will eventually open source our solution. - moltonExplorercool, thanks so much for the input, and thanks for working on that solution too. I'm all too familiar with joystick enumeration problems from the user end. I'll have to look into cinput and Unity's own input system, I got Unity to work with the Rift and assumed it was Unity's decision to go Xinput, I didn't realize that stuff was just part of the Oculus Integration.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device