Search Unity

PS4 Controller - Multiple Button Triggers

Discussion in 'Input System' started by bob_mosh, Jan 17, 2020.

  1. bob_mosh

    bob_mosh

    Joined:
    May 30, 2018
    Posts:
    12
    Hey guys!

    I am currently playing around with creating a Smash Bros. Style game and would love to support a variety of input options. The issue here is, whenever I'm testing with my PS4 DualShock, I get some weird results.

    I believe the root of the issue is that the PS4 controller is not recognised but instead registered as "Unknown Wireless Controller" whenever I use it using Bluetooth. Cable seems to work fine. Any ideas why that might be?

    I am using macOS Catalina on my MBP by the way.
    Has anyone else had the same issue?

    The second Issue I'm having (wich is far more painful than the first one) is that whenever I use the PS4 Controller, my player jumps behave differently. The issue I identified for the jump count not being calculated correctly is caused by the Triangle button firing multiple times while tapping it only once. In theory I would expect the event to fire only once since my interaction is set to "Presses Only" but the reality is that multiple jumps get triggered at almost the exact same time. Plus it even fires with Value 0 two times when lifting the finger off the button. Again this should not happen since I use "Presses only". Any ideas? Would love to understand why this is happening. :)

    Cheers,
    Ferdinand
     
    Last edited: Jan 17, 2020
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    IIRC that's expected behavior ATM. No clue why, but when connected over Bluetooth, some information from the HID that is present when connected over USB gets lost and the product string comes out as "Unknown Wireless Controller".

    When you pop open the input debugger (Windows >> Input Debugger) and double click the controller, do you see "DualShock4GamepadHID" next to the "Layout" property? If so, the controller is recognized as expected.

    Hmm, that does sound like we're getting bad data at the platform level. Would you mind filing a bug report so that our QA can have a look?
     
  3. bob_mosh

    bob_mosh

    Joined:
    May 30, 2018
    Posts:
    12
    Ahhhh that explains it. Looks like the gamepad works properly and is recognised properly. I testes everything with the controller connected via USB and once I disconnected the USB and used Bluetooth everything worked as expected. Seems like you're completely right about the Information getting lost for some reason. Everything else works like a charm now! Thanks!



    Sure, will do that :) After fixing all my input issues the bug still persists, so it seems like there's really a bug here. :/ Or I'm too stupid to setup th eInput currently but I've tried many different things.
     
  4. PlayCreatively

    PlayCreatively

    Joined:
    Jan 25, 2016
    Posts:
    94
    In my case Unity does recognize it as DS4 over bluetooth but the problem persists like described by OP. However it does work as intended over bluetooth when playing a build. Find that to be interesting and might hint at the bug's origin
     
  5. david-milian

    david-milian

    Joined:
    Jul 13, 2019
    Posts:
    6
    I had this issue recently and solved 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
     
    Bl0ckDave likes this.
  6. Smileys

    Smileys

    Joined:
    Feb 27, 2014
    Posts:
    81
    Hey - i have the same setup and the same problem. However i cant get it running with "just USB". My controller does not show up under the USB devices. Tried to reset the controller, en/disable bluetooth etc.
    It shows up as "Unknown DUALSHOCK 4 Wireless Controller" after a reset. But before that it was also just "Unknown Wireless Controller".

    Is there any solution to get my PS4 controller running in macOS?
     
    jeffreylanters likes this.
  7. jeffreylanters

    jeffreylanters

    Joined:
    May 8, 2013
    Posts:
    10
    Any chance this has been solved yet? I'm running into the same problem using Unity 2020.1.17, Input System 1.0.1 and Mac OS 11.1. Thanks!
     
  8. Bl0ckDave

    Bl0ckDave

    Joined:
    Aug 15, 2019
    Posts:
    2
    Bro I love you! <3 Thanks