The current version of JoyToKey supports xinput devices and can read all of the axes and buttons on xinput controllers if you enable show all axes in the options. Then I can use my triggers in Silent Hill 2, 3, 4, etc.Īnother program is Xoutput 0.11 but that's basically a "driver" version of Xbox 360 CE, which works well with PS3 controllers, and won't work with Xbox 360 controllers. I really like Xinput plus because it allows me to use my Xbox 360 triggers in a directinput game, by allowing me to set the triggers as buttons 11 and 12 and then to enable directinput output. It's basically "X360CE (Xbox 360 controller emulator) in reverse, meaning it requires an xinput device (Xbox 360 controller, xbox 360 fightsticks, xbox one). Note that Xinput Plus allows you to set deadzones, remap buttons, etc, and even allow you to use your controller in directinput mode with remapped buttons or dpad. You can try JoyIDs, or Xinput Plus (Xinput plus is ONLY for xinput controllers!!) to see if one of those will help.
![xinput test controller 1 not connected xinput test controller 1 not connected](https://user-images.githubusercontent.com/122685337/212479357-6f2577f4-b993-4cc7-8081-6f8d921dd0d8.png)
Most likely, you would have the exact same issue with Battlefield 3 and Battlefield 4, which only accept the first game controller detected.Īnyway, there may be a few programs which let you change the ID of game controller devices, but I never had any luck with changing ID's A mouse should NEVER be seen as a game controller! In other words, trash that mouse and get something decent like a Logitech G900 or G502. Then I just set the floats when I want vibration (again, doesn’t seem to matter much WHAT I set them to, that’s the issue now… I think it goes 0 to 1, but I can’t get the full vibration as in the demo project no matter what I try.It seems like your mouse is using game controller HID software to control this. GamePad.SetVibration(PlayerIndex.One,testC, testD) GamePad.SetVibration(PlayerIndex.Two,testA,testB) Public class XInputVibrateTest : MonoBehaviour Here’s the script I’m using, in case anyone’s interested: using UnityEngine So now I’ve got the vibrate basically working, just not as strong as I’d like it to be. Update:figured out the PlayerIndex, it’s PlayerIndex.One, PlayerIndex.Two, etc. If there’s anyone out there who knows how to do this, an example would be extremely helpful… But if I replace with my own floats, just a faint murmur. In the test scene, (using the etc.) the vibrate fully works, at least on the one controller. Only seems to take input from one though.Īll I need is to be able to refer to each controller as a PlayerIndex.ī: since the two latter arguments are floats, can’t I just set them manually? Why doesn’t this work? Note: the test detects both controllers, as evidenced in the debug log. The xinput test only seems to take input from one controller (controller 2), so what I want to figure out is:Ī: how can I set up the xinputdotnetpure.PlayerIndex for each controller, since the example only seems to work for one? (the format is SetVibration(XInputDotNetPure.PlayerIndex,float,float))ĭoesn’t seem to matter what number I use, all I get is a faint murmur on one controller.
![xinput test controller 1 not connected xinput test controller 1 not connected](https://64.media.tumblr.com/72edb653e911a185917a53027379ecaa/723a6d39b9bd16c6-19/s1280x1920/95b0c952b51c224e900aeeceace72c10a476e939.png)
Gamepad.SetVibration(playerIndex, vib1,vib2) However, if I plug in a 1 through code, such as : The line for vibration is : Gamepad.SetVibration(playerIndex, ,) īy exposing the, in the inspector, they appear as normal axis input, maxing out at 1. Since I don’t really fully understand how xinput works, I’ve been trying to use that example to add force feedback to my own project. So, In the sample unity project xInputTest which is included, there is a line accessing vibrate for each motor based on trigger input. Works perfectly, only minor bug seems to be it detects controller 1 as 2 and vice versa, not a big problem to work around. To get this to work, I’ve added xInputPureDotNet to my project.
![xinput test controller 1 not connected xinput test controller 1 not connected](https://4.bp.blogspot.com/-xtqXQRvIhHg/VUJeGcwdMGI/AAAAAAAABfg/Oaf1Lw0UXms/s1600/usb_joystick_properties.jpg)
I’m working on a fighting game, using two 360 controllers for 2 players.