Connecting a PS5 DualSense gamepad to the computer using usb, it is recognized as a DualShock4GamepadHID and all bindings are wrong.
In the same way, I also connected the XBOX 360/DualShock4 (the real PS4 gamepad) gamepad and both recognized the device correctly and worked fine.
To reproduce the process, on windows 11
- create a new project with Unity 2022.3.48f1
- Install Input system 1.11.0
- Change Project Settings/Player/Acitve Input Handing to InputSystemPackage(new)
- Create the default Project-wide Actions in Project Settings/Input System Package.
- Create a GameObject in an empty scene and add the PlayerInput component, set Behavior to Invoke C Sharp Event.
- Create a script to listen to PlayerInput.onActionTriggered.
using UnityEngine;
using UnityEngine.InputSystem;
public class InputLogger : MonoBehaviour
{
private PlayerInput _pInput;
public PlayerInput PInput => _pInput ??= gameObject.GetComponent();
void Start()
{
PInput.onActionTriggered += OnActionTriggered;
}
private void OnActionTriggered(InputAction.CallbackContext context)
{
if (context.performed && !context.action.activeControl.noisy)
{
Debug.Log($"{context.action.name} {context.action.activeControl.device.name}");
}
}
}
PS. My PS5 controller came with the PS5 dev console, which shouldn’t be the cause of the problem.
If needed, I can upload my Unity test project (which was created by the process I described above), which is very small, but it doesn’t seem to support uploading .7z files here.
I’ve re-checked and can confirm that the PS5 DualSence is indeed misrecognized as a DualShock4GamepadHID and that all the inputs are wrong.
Replicating this error didn’t require any fancy steps, create a new project with 2022.3.48f1, install the input system, configure everything as default, and then connect the DualSence to the computer with usb.
It’s so basic and obvious that I double-checked that I wasn’t getting something wrong.
As you can see above, the ones highlighted in red are the results of logging after pressing L2 (DualSense’s left trigger) once.
When R2 is pressed, the logged action name is Sprint, which is wrong.
And the game view shows this screen, which is a series of screens that quickly page through until it closes when R2 is held down.
In addition, it logs Navigate messages continuously, even if you just leave the DualSense on the table and don’t touch it.
Any help would be appreciated.
I ran the same test with another DualSense and found that InputSystem recognized and used it correctly. The difference is that this DualSense came with the PS5 that my colleague bought.
It seems that the problem is with the DualSense that comes with the PS5 dev console (hereafter Dev DualSense).
However, Rewired recognizes this [Dev DualSense] correctly and works fine, it uses the Guid to identify the specific model of the different gamepads, and this Dev DualSense’s Guid is 5286706d-19b4-4a45-b635-207ce78d8394, which is exactly what it defines as a PS5 DualSense Guid
Now, I’m not sure if there are two types of PS5 DualSense, one that can be correctly recognized and used by InputSystem, and one that can’t
On the left is the DualSense that comes with the PS5 Dev Console (which is not recognized and used correctly).
On the right is the DualSense that came with my colleague’s PS5 (which can be recognized and used correctly).