반응형
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Acoustic Cloud

PS4 controller map for Unity 본문

Dev/Unity

PS4 controller map for Unity

어클 2020. 12. 28. 14:32
반응형

제일 정확.

https://ritchielozada.com/2016/11/21/playstation-4-dual-shock-controller-input-mapping-with-unity-on-windows-10/

 

 

I just spent a few minutes finally figuring this out; figured I'd save other folks the time. :)

 

PS4 Controller Map for Unity

Buttons

Square = joystick button 0

X = joystick button 1

Circle = joystick button 2

Triangle= joystick button 3

L1 = joystick button 4

R1 = joystick button 5

L2 = joystick button 6

R2 = joystick button 7

Share = joystick button 8

Options = joystick button 9

L3 = joystick button 10

R3 = joystick button 11

PS = joystick button 12

PadPress= joystick button 13

 

Axes:

LeftStickX = X-Axis

LeftStickY = Y-Axis (Inverted?)

RightStickX = 3rd Axis

RightStickY = 4th Axis (Inverted?) -> 6th

L2 = 5th Axis (-1.0f to 1.0f range, unpressed is -1.0f)

R2 = 6th Axis (-1.0f to 1.0f range, unpressed is -1.0f)

DPadX = 7th Axis

DPadY = 8th Axis (Inverted?)

 

 

Edit: Formatting

 

Edit2: I put a question mark after Inverted because I swear that the LeftStickY axis worked just fine with one of my scripts, but when I was using a certain test case it seemed like it was inverted. YMMV.

반응형