# \[Tutorial\] UE4 using Dualshock4 controller (via USB, PS4 DS4 Gamepad)

**URL:** <https://forums.unrealengine.com/t/tutorial-ue4-using-dualshock4-controller-via-usb-ps4-ds4-gamepad/133314>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine\
**Created:** [November 11, 2019, 4:30pm UTC](https://forums.unrealengine.com/t/tutorial-ue4-using-dualshock4-controller-via-usb-ps4-ds4-gamepad/133314 "2019-11-11T16:30:24Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![philv123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@philv123](https://forums.unrealengine.com/u/philv123)\
**Post date:** [September 8, 2020, 11:51pm UTC](https://forums.unrealengine.com/t/tutorial-ue4-using-dualshock4-controller-via-usb-ps4-ds4-gamepad/133314/24 "2020-09-08T23:51:25Z")

</div>

Thanks so much for this tutorial! I’m using UE 4.25.3 and Windows RawInput 1.0. I got this working with slightly different values than the original post, and I think it’s because either my version of UE or RawInput is newer than when this was originally posted.

In my Edit \> Project Settings \> RawInput, there’s a option for each axis called “Gamepad Stick” which makes things very easy. Also my ProductID is 0x09CC (the [documentation for RawInput Plugin](https://docs.unrealengine.com/en-US/Gameplay/Input/RawInput/index.html) shows how to find this).

Here’s all my settings under Edit \> Project Setings \> RawInput in case it helps someone else. I’ve also included what each axis and button maps to for me. For me the Dpad V & Dpad H are both on Axis 5 with nothing on Axis 6.

Vendor ID: 0x054C  
ProductID: 0x09CC  
Axis[0]:USB Axis 1 - RStick V Inverted: Yes  
Gamepad Stick: Yes  
Offset: 0.0

Axis[1]:USB Axis 2 - RStick H Inverted: No  
Gamepad Stick: Yes  
Offset: 0.0

Axis[2]:USB Axis 3 - LStick V Inverted: Yes  
Gamepad Stick: Yes  
Offset: 0.0

Axis[3]:USB Axis 4 - LStick H Inverted: No  
Gamepad Stick: Yes  
Offset: 0.0

Axis[4]:USB Axis 5 - Dpad V & H Inverted: No  
Gamepad Stick: No  
Offset: 0.0

Axis[5]:USB Axis 6 - doesn’t do anything Maybe it’s supposed to be the touchpad area?

Axis[6]:USB Axis 7 - R2 trigger axis (also Button 8) Inverted: No  
Gamepad Stick: No  
Offset: 0.0

Axis[7]:USB Axis 8 - L2 trigger axis (also Button 7) Inverted: No  
Gamepad Stick: No  
Offset: 0.0

[HR][/HR]  
Button[0]: USB Button 1 - Square  
Button[1]: USB Button 2 - X  
Button[2]: USB Button 3 - O  
Button[3]: USB Button 4 - Triangle  
Button[4]: USB Button 5 - L1  
Button[5]: USB Button 6 - R1  
Button[6]: USB Button 7 - L2 trigger (also Axis 8)  
Button[7]: USB Button 8 - R2 trigger (also Axis 7)  
Button[8]: USB Button 9 - Share  
Button[9]: USB Button 10 - Options  
Button[10]: USB Button 11 - L3  
Button[11]: USB Button 12 - R3  
Button[12]: USB Button 13 - PS  
Button[13]: USB Button 14 - Touchpad Click  
[HR][/HR]  
One thing that was really helpful to figure the axis values and mapping was to open the game console (press the **[FONT=Lucida Sans Unicode]`** (backtick) key) and type **[FONT=Lucida Sans Unicode]showdebug input**

---

_[View the full topic](https://forums.unrealengine.com/t/tutorial-ue4-using-dualshock4-controller-via-usb-ps4-ds4-gamepad/133314)._
