![]() 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. 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. (If prompted beforehand, click more info or I understand and run anyway) 3. Updated Force Feedback Driver for Xinput Controller 2. In the test scene, (using the etc.) the vibrate fully works, at least on the one controller. If you are seeking support for official wired and wireless Xbox 360 controllers go here: Force Feedback Driver for Xbox 360. 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. Gamepad.SetVibration(playerIndex, vib1,vib2) However, if I plug in a 1 through code, such as : XInput-Controller von Drittherstellern ähneln den Microsoft-Gamepads oft stark. Prominente Beispiele für XInput-Controller sind die offiziellen Controller von Microsoft mit ihren auf verschiedener Höhe angebrachten Analogsticks und breiten Gehäusen. The line for vibration is : Gamepad.SetVibration(playerIndex, ,) īy exposing the, in the inspector, they appear as normal axis input, maxing out at 1. Bei modernen Spielen sind XInput-Controller die bequemere Wahl. 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. Using XInput is as simple as calling the XInput functions as required. 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. I’m working on a fighting game, using two 360 controllers for 2 players.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |