RawInput Configuration
Enabling RawInput is required to use DualSense input features in Unreal Engine 5.
To use the DualSense controller with Unreal Engine, the RawInput plugin must be enabled.
Once enabled, you can configure it to recognize and handle DualSense input data, such as trigger axes, thumbsticks, and buttons.
Note: You can also adapt this setup for other controllers like the DualShock 4.
For more advanced use cases, you may refer to this open-source project:
๐ UEPlaystationGamepad by DarknessFX
INI Configuration for DualSense
Add the following block to your project's Config/DefaultInput.ini
to properly map the controller's input axes and buttons.
[/Script/RawInput.RawInputSettings]
+DeviceConfigurations=(VendorID="0x054C",ProductID="0x0CE6",AxisProperties=((Key=Gamepad_RightTriggerAxis),(Key=Gamepad_LeftTriggerAxis),(Key=Gamepad_RightY,bInverted=True,bGamepadStick=True),(Key=Gamepad_RightX,bGamepadStick=True),(Key=Gamepad_LeftY,bInverted=True,bGamepadStick=True),(Key=Gamepad_LeftX,bGamepadStick=True),(Key=GenericUSBController_Axis7,bGamepadStick=True),(Key=GenericUSBController_Axis8)),ButtonProperties=((Key=Gamepad_FaceButton_Left),(Key=Gamepad_FaceButton_Bottom),(Key=Gamepad_FaceButton_Right),(Key=Gamepad_FaceButton_Top),(Key=Gamepad_LeftShoulder),(Key=Gamepad_RightShoulder),(Key=Gamepad_LeftTrigger),(Key=Gamepad_RightTrigger),(Key=GenericUSBController_Button9),(Key=GenericUSBController_Button10),(Key=Gamepad_LeftThumbstick),(Key=Gamepad_RightThumbstick),(Key=GenericUSBController_Button13),(Key=GenericUSBController_Button14)))
bRegisterDefaultDevice=True
๐ Tip: These values correspond to the VendorID and ProductID of official Sony DualSense controllers. If you're using a third-party model, you may need to adjust them.
Try it with the Boilerplate Project
The easiest way to understand how RawInput works with DualSense is by using the boilerplate project.
It includes a working example of all necessary settings and Blueprint configurations.
Enhanced Input + DualSense (Advanced)
For more complex setups using Unreal Engine's Enhanced Input System, you can refer to these official resources: