-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impulse Trigger #34
Comments
does Impulse triggger works on Forza? |
Of course! all UWP and Xbox One games supports Impulse Trigger. Forza is from Microsoft |
Duh! I forgot to say..The point is, I request Impulse trigger support in this library whenever possible. |
I'm also interested in this issue, I forked the project and started to investigate a bit, I was able to use the UWP Api with C++ but even though I was able to catch the controllers connection and disconnection events, and read the gamepad state, somehow the vibration set function doesn't seem to work, the result of the operation returns a succesful value but nothing happens. :( Here are so references I used: https://github.com/araghon007/X1nput There is also a new Arduino XInput library that enables you to simulate a xbox controller, but it also miss the vibration part. |
Today I researched a bit more, seems like someone has a driver for linux written in C which supports vibration in the triggers. I'm very ingnorant when it comes to Windows drivers, I wonder if there is a way to read/write the xbox controller usb port without using XInput. https://github.com/atar-axis/xpadneo/tree/master/hid-xpadneo/src |
I have done some research on this as well. There is a XInputSetStateEx in more recent versions of xinput*.dll which can apparently set the impulse triggers. I would accept a PR for this as I’m busy at the moment.
From: Leon Moctezuma
Sent: 08 July 2019 21:01
To: speps/XInputDotNet
Cc: Subscribed
Subject: Re: [speps/XInputDotNet] Impulse Trigger (#34)
Today I researched a bit more, seems like someone has a driver for linux written in C, I'm very ingnorant when it comes to Windows drivers, I wonder if there is a way to read/write the xbox controller usb port without using XInput
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi Remi, thanks for sharing this project. Interesting, well I did a dumpbin of xinput1_4.dll and one can set that there are at least 6 non named exported functions. You actually are using one of them the 100 in the followin line:
How did you managed to figure out what this function was? How did you find about XInputSetStateEx? Do you have any link or reference? |
Maybe a DLL redirection might help, I have never done such thing... I would need a program that uses those noname functions through XInput. https://www.ethicalhacker.net/columns/heffner/intercepted-windows-hacking-via-dll-redirection/ |
Any update on this? I'd love to contribute myself, but this kind of stuff is a fair bit too advanced for me. Seems like a rather big oversight not to include and expose this functionality in XInput? Or maybe it was an attempt to push people to use UWP? 😄 What I'm trying to use it for is rendered useless since you can't use the gamepad if your UWP app loses focus, so seems like I'm gonna have to try and find some way to fake/intercept the focus if at all possible. Guessing this is why only a select few games make use of them, cause they have to use UWP. Shame really cause it's a really cool feature. |
I found some more information, will have a go at it this week possibly. |
Oh yeah, btw, I had tried that Unfortunately, that support for Impulse trigger in every game in xpadneo basically augments current standard Rumble. If you hold either or both of trigger, then the Rumble event happens, the Impulse Trigger will happen until you drop the triggerr or Rumble event stop. Yeah, basically just addition of vibration, not meaning to add coding functionality for Linux game developer about Impulse trigger event thingy.
I had ever attempted to Windows Gamepad API on C# Unity when the platform is on PC (Win32). It doesn't work. it errors. but as your stack overflow share above, which is C++ win32, hmmm, that's interesting. |
I did find how to do it, I just need to try. It would be on Windows only for now. I need to dig into UWP later. |
Did you manage to try it out? I tried myself, but no success here |
This is something I'm fighting against now while developing my UWP app. So far, this is what I learned:
Conclusion: so far, I see no way to vibrate trigger motors in Xbox controller when the app is not in focus. Same was found by others. |
Oh wow, thank you @JOELwindows7 for bringing this up. It's been 3 long years since the last post here. I've been diving into this problem just now. I am working hard on a racing game on unity and the Impulse Trigger would be much appreciated, but I couldn't find ANYTHING. Did anyone managed to get a solution? |
Microsoft has a new input API called typedef struct GameInputRumbleParams {
float lowFrequency;
float highFrequency;
float leftTrigger;
float rightTrigger;
} And as to what @lexasss stated regarding application focus, it seems this new API also take this into consideration. I no longer have any real need for this, so can't really test it myself. But it looks promising! 😄 |
Introduction
Xbox One controller has aditional small vibrator on each of the two triggers. Microsoft calls this Impulse Trigger.
Demo Video: Xbox One controller Impulse trigger demo
Article: GamesRadar
Sorry for I couldn't find good articles right now.
As you can see, aside from its large vibrators on the grip, the trigger has its own little vibration to increase feedback clarity.
Experiencing
If you have a device that runs Universal Windows Platform app such as Xbox One, Windows 10, etc. you can test your Xbox One controller with this app called Game Controller Tester. This free utility allows you to test whether or not your controller works well.
To the Impulse Trigger
To understand what does Impulse Trigger actually feels, please do the following:
If you are using Xbox One controller, you will feel vibration just on the trigger since the Impulse Trigger was ticked on the test setting.
Otherwise, you will feel nothing on Xbox 360 Controller since there is no vibrator on each trigger.
if you tick Vibration, and start testing again, you will feel the grip vibrates.
Problem
Xbox One Impulse trigger is one of the cool feature that may fit within our Stand Out standard. This is because it is unusual and unique feature that stands out from the rest.
Therefore we have a desire to implement Xbox One Impulse trigger on most of our game in Unity.
Unfortunately, we encountered troubles as we are finding out ways to do so.
xex
. You will be disappointed for that you could not experience Impulse trigger on a version that it not Microsoft Store like UWP orxex
Xbox One. e.g., Game A supports Impulse Trigger on Microsoft Store version, but Game A doesn't support Impulse Trigger on Steam version.using Windows.Gaming.Input
only works if you build it to UWP. therefore the only solution to prevent error is to wrap them insideUNITY_WSA
defintion to detect exactly if you are on UWP export build and not in editor. This version if for cross platform project.Unity platform dependent defintion
exe
version according to this Impulse Trigger on PC Games. Please note that however we haven't yet tested the F1 2017 ourselves to confirm the information whether it is fact or hoax. Beside of that, all UWP games supports Impulse Trigger.Thank you for your attention.
The text was updated successfully, but these errors were encountered: