Im new to Unreal and started a new 3rd person game. Wanted to switch to a playstation controller. Cant seem to find any answer to this
Hey there @R3D1988! Welcome to the community! Here’s a tutorial for getting Dualshock 4 input working in Unreal. Generally you can take raw input due to DS4s not having a proper windows API. There’s also a Dualshock input plugin but I have personally never used it.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Let me know if you have any questions!
You can also try using “DS4Windows”. It handles PS4 controllers rather well, even allowing for bluetooth connection to sync up.
Unreal works with it no problem.
Probably better to get it form the official site or compile it from github.
Excellent call Raven. I second this option as well, for reference to everyone else reading this, DS4Windows is a wrapper that takes the Direct input from DualShock controllers and makes them output as Xinput (like Xbox controllers). I use it for gaming myself only platforms that don’t regularly support Dualshock. The biggest perk as Raven mentioned is being able to have it wired or not, which if you’d never worked with Dualshock inputs, they change when directly connected and bluetooth. DS4Windows aggregates them to have unified output and it’s so nice.
UPDATE:
We now have easier support for PS4/5 controllers in Unreal with the new “Game Input for Windows” plugin: Game Input for Windows - Experimental Release Notes
Original answer:
I want to clarify something regarding the Dualshock input plugin in Unreal Engine. Currently and unfortunately that only works for projects where the developers have the PlayStation SDK installed, which only studios that are registered on the Sony PlayStation dev network can do.
If you don’t have access to the Sony PlayStation dev network there’s currently no easy way to get PS5 controllers just “plug and play” working with your Unreal Engine game that I know of.
When it comes to alternatives:
-
DS4Windows runs locally on the user’s computer, so anyone wanting to play the game with a PS controller would need to install it to get the PS5 controller working.
-
If you’re releasing on Steam then it handles the input rebinding for you, so Steam customers would get it working easily but not other storefronts, nor if you’re just launching the executable directly. You might be able to test it by adding your game’s executable as a “non-Steam game” and running through that.
-
There might be some marketplace assets adding unofficial PS5 controller support, a brief search on the marketplace shows “SimpleController” claiming PS controller support. I haven’t tested it and can’t vouch for it.
-
Raw Input might work, seems the video that @SupportiveEntity linked goes that route. I might need to try that one
Hopefully in the future Windows will somehow have the PS4/5 controllers recognized as General Controller Input Devices which DirectX would handle abstracting away for all games and engines.
The ds4 windows worked perfectly with the 3rd person default. Thanks
I just tried the demo with my PS4 controller for Simple Controller. It not only read every input properly, including how hard I was pressing L2 and R2, but was also able to send a rumble signal to my controller. It honestly left me impressed. I may pick it up and see how easy it is to work with.
I was looking into this because I am currently translating the raw input myself, and I’m running into an issue where the player is crouching with D-pad, and stands up when I press another button on the controller.
Here is an example in Blueprints:
Read the Readme on how it works.
We now have easier support for PS4/5 controllers in Unreal with the new “Game Input for Windows” plugin: Game Input for Windows - Experimental Release Notes