Dude this is the best. I was just looking for this information recently but had put it on hold for a moment. This has saved me a nice chunk of time really appreciate it.
I’m glad it’s helpful. I knew some UE4 PC games like CodeVein are able to detect and use DS4 (via USB) successfully, after a few tries with the RawInput plugin it actually did work and it’s not hard to add to the project.
Thanks a thousand times man! Now someone needs to write a plugin that would enable extra functionality like touchpad swipes, gyros, vibro feedback and lightbar.
Yeah, that would be great to have, with support for the audio jack too. Sony Playstation is missing a good opportunity to release full driver support for DualShock4 on PCs.
You may notice that after setting up Raw Input with DualShock 4, controls in project will go crazy and will appear unresponsive. This is so because controller is simply sending too much data and Raw Input plugin simply glitching out because of it. You need to filter out this data like this: Imgur: The magic of the Internet . Also, the buttons would took 4 to 6 times to press before anything happens.
there is a fix for this in another thread about RawInput (sorry I don’t have the link). Sadly it caused the d-pad to not function, so maybe not the best fix, but if people want the link I can try to find it again.
The sticks worked fine. I can’t seem to find the thread now, but basically it involved commenting out a line in the rawinput plugin. It 100% fixed the issue you mentioned (data overload, missed button presses, unresponsiveness), and everything was working perfectly. except d-pad would only detect up on the vertical axis, and nothing else.
when I get in front of my computer later, I’ll try to find it again.
Hi, thanks for the post. The big problem I am having is the button presses take way to long to register. You said it was a fix involving commenting out a line, what was it, or do you have the thread where they mentioned a fix?
Does this work on Mac too? I know Catalina is compatible with DS4 via Bluetooth and I do in fact have it properly recognized and connected, but even when I enable the Windows Raw Input plugin, it’s not in Project settings.
Hi all. Thanks for your patience. Sincerely sorry for taking so long to get back to you on this. I’ve finally been able to find the post that I was able to use to solve the “unresponsive” button issue:
is redundant. From what I remember, (this was a long time ago I looked at it), it’s basically creating an infinite loop that continues til interrupted and floods the program with input. By commenting out that line, the inputs all worked perfectly and predictably with the exception of the d-pad.
Perhaps this line of code served some purpose related to the d-pad? My level in C++ is too low to really get it. But hopefully this will help someone more advanced than myself track down a more proper way to fix the issue.