Skip to content

Instantly share code, notes, and snippets.

@Vanawy
Last active November 8, 2021 19:56
Show Gist options
  • Save Vanawy/e5350c808558add47c6bf388bff99cf1 to your computer and use it in GitHub Desktop.
Save Vanawy/e5350c808558add47c6bf388bff99cf1 to your computer and use it in GitHub Desktop.

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?)
    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?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment