Search Unity

Using PS4 controller in Unity

Discussion in 'Editor & General Support' started by GVA1994, Mar 7, 2016.

  1. GVA1994

    GVA1994

    Joined:
    Mar 7, 2016
    Posts:
    5
    Hey guys,

    I've been Googling around for help on the subject and found some stuff, but am too much of a noob to understand it. I'm wondering how to map the buttons on my Ps4 controller to control my player in my fighting game. I've hooked up the Ps4 controller with USB, but don't know what to do in the Input Settings Tab.

    Any help is greatly appreciated!
     
  2. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Ryzeson and jbb1979 like this.
  3. GVA1994

    GVA1994

    Joined:
    Mar 7, 2016
    Posts:
    5
    Thank you for your help! I'm looking to use the Unity input system. However, I don't understand how and where to use the information you just linked me to. Where do I input these values to make sure my Ps4 controller works with my game?
     
    unity_btYHnwXNMuFKbw and jbb1979 like this.
  4. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    You want to put them into the Input Settings.
    Go to Edit -> Project Settings -> Input.

    And for the record: www.unity3d.com/learn <- do everything here ;)
     
    jbb1979 likes this.
  5. GVA1994

    GVA1994

    Joined:
    Mar 7, 2016
    Posts:
    5
    Got it. Thanks!
     
    jbb1979 likes this.
  6. cowlinator

    cowlinator

    Joined:
    Mar 15, 2012
    Posts:
    69
    jbb1979 likes this.
  7. cqc_29a

    cqc_29a

    Joined:
    Jan 3, 2016
    Posts:
    1
    slice3d and jbb1979 like this.
  8. clang2

    clang2

    Joined:
    Jan 27, 2018
    Posts:
    9
    i created an Input preset for the PS4 and wrote a simple event-based controller based off the presets. Feel free to take a look.

    https://github.com/seelang2/UnityPS4Controller

    It uses the mapping in the reddiit post mentioned in comment #7 above.
     
  9. david-milian

    david-milian

    Joined:
    Jul 13, 2019
    Posts:
    6
    Its possible to use ds4 via Bluetooth by:
    - Using ds4windows
    - disabling the DualShockGamePadHID controller and leaving enabled XInputControllerWindows: Window -> Analysis -> Input Debugger.

    With this configuration the ds4 works completely fine by Bluetooth. For some reason the right joystick had inverted directions.

    Hope it helps
     
    MurphyMurph_21 likes this.
  10. sretardus

    sretardus

    Joined:
    Nov 7, 2020
    Posts:
    1
    so download a package called input systum then download it and then go to the plus thats below project click it and press input actions at the bottom then double click the thing you just created and put that tab werehever then you should find something called action maps make one by pressing the plus near were it says action maps and an acion should be made which has a binding below it press on the binding and under where it says binding press that and select your button you can make more action maps actions and bindings under the action and i wont tell you anything codey BECAUSE I DO NOT KNOW HOW TO PROGRAM OR CODE WITH THAT PACKAGE