godot icon indicating copy to clipboard operation
godot copied to clipboard

PS5 controller doesn't work in 4.3-stable

Open fkallevik opened this issue 1 year ago • 8 comments

Tested versions

  • Reproducible in: 4.3-stable. - Not reproducible in: 4.2-stable.

System information

Godot v4.3.stable - macOS 14.3.1 - GLES3 (Compatibility) - Apple M1 Max - Apple M1 Max (10 Threads)

Issue description

PS5 controller no longer registers any inputs after updating from Godot 4.2-stable to 4.3-stable. No errors in console. Installed 4.2 again and confirmed the PS5 controller works again in that version.

Steps to reproduce

Run "2D Platformer Demo" in Godot 4.3-stable w/ a PS5 controller connected and try playing w/ PS5 controller.

Minimal reproduction project (MRP)

2d_platformer.zip

fkallevik avatar Aug 15 '24 19:08 fkallevik

Can you check if it happens in 4.2.2? To compare with a supported version

AThousandShips avatar Aug 15 '24 19:08 AThousandShips

I can't reproduce it, PS5 controller seems to be working (macOS 14.6.1). The menu in the 2D Platformer demo seems to behaving strangely, so there might be an issue with input map in the demo.

Joysticks demo detect all inputs correctly, so controller mapping should be fine as well.

Edit: Demo input map is definitly off: Screenshot 2024-08-15 at 23 33 26

bruvzg avatar Aug 15 '24 20:08 bruvzg

I have the same Problem on Win10 after updating to 4.3 (from 4.2) it doesn't work anymore. The keyboard controls work fine though. Godot recognizes the input of the controller if I want add another action to my project, but if I start it (with F5) the controller input seems to be ignored. image

egnrse avatar Aug 16 '24 10:08 egnrse

@AThousandShips PS5 controller also works in version 4.2.2-stable

fkallevik avatar Aug 16 '24 15:08 fkallevik

I did a git bisect bad 4.3-stable && git bisect good 4.2.2-stable and it seems the bug was introduced in: [07313a08f41146e30005acfa784bdf005d23750b] Migrate macos controller API to GameController.h

fkallevik avatar Aug 16 '24 16:08 fkallevik

Migrate macos controller API to GameController.h

This commit removed old deprecated controller API in favor of new API.

Are you connecting the controller via Bluetooth? I'm not sure if wired connections are supported by the new API. Check if your controller is visible in the System Preferences.

Screenshot 2024-08-16 at 19 56 32

bruvzg avatar Aug 16 '24 16:08 bruvzg

The controller shows up in System Preferences "Game Controllers". I tested both wired and Bluetooth now and neither works in Godot 4.3. The controller does vibrate when clicking "Identify" for both wired and wireless, and the controller works in Steam games w/ either connection type (tested in Celeste).

fkallevik avatar Aug 16 '24 17:08 fkallevik

Just want to add on that my Xbox series controller is having the same issue, but for some reason my ps5 controller does not (on Windows)

  • Production edit: Issue opened: https://github.com/godotengine/godot/issues/95671

Perryplats avatar Aug 17 '24 00:08 Perryplats

I could fix my problem (on windows 10, godot installed over steam) by disabling the steam controller input before launching godot.

egnrse avatar Sep 13 '24 19:09 egnrse

I have a project under 4.3-mono with macOS 15.1.1 and PS5 Dualsense controller works perfectly fine in wired and bluetooth mode

2D platformer demo with 4.3 vanilla works fine as well

francoisdlt avatar Dec 06 '24 15:12 francoisdlt

I'm having the same issue with a PS5 controller (using Bluetooth, have not tried wired) on Mac 15.1

There are no events generated for any of the controller keys/axis in Godot 4.3 but they generate in 4.2

this is the code i've used to check if there are any events being created.

public override void _Input(InputEvent @event)
{
	if (@event is InputEventKey keyEvent)
	{
		GD.Print($"Key: {keyEvent.Keycode}, Pressed: {keyEvent.Pressed}");
	}
	else if (@event is InputEventMouseButton mouseEvent)
	{
		GD.Print($"Mouse Button: {mouseEvent.ButtonIndex}, Pressed: {mouseEvent.Pressed}, Position: {mouseEvent.Position}");
	}
	else if (@event is InputEventMouseMotion motionEvent)
	{
		GD.Print($"Mouse Motion - Position: {motionEvent.Position}, Relative: {motionEvent.Relative}");
	}
	else if (@event is InputEventJoypadButton joypadEvent)
	{
		GD.Print($"Joypad Button: {joypadEvent.ButtonIndex}, Pressed: {joypadEvent.Pressed}");
	}
	else if (@event is InputEventJoypadMotion joypadMotionEvent)
	{
		GD.Print($"Joypad Axis: {joypadMotionEvent.Axis}, Value: {joypadMotionEvent.AxisValue}");
	}
}

problematik avatar Jan 12 '25 22:01 problematik

Could some affected users test 4.4-beta2 or later?

There's been some fixes from @stuartcarnie to gamepad support for Apple devices in https://github.com/godotengine/godot/pull/94580, maybe that helped with this.

akien-mga avatar Feb 06 '25 00:02 akien-mga

I don't have a PS5 controller; otherwise, I would test it too.

stuartcarnie avatar Feb 06 '25 03:02 stuartcarnie

Tested on Mac OS 15.3 using Godot 4.4.beta_2 with PS5 controller - all standard buttons, triggers, axis, d-pad and vibration work. Thanks! 🎉

problematik avatar Feb 07 '25 11:02 problematik

Awesome, thanks for confirming. Closing as fixed in 4.4, most likely by #94580.

akien-mga avatar Feb 07 '25 11:02 akien-mga