Skip to content

PS4/Dual Shock 4 controller analogue input causes actions to ignore other connected controllers' analogue input events #86272

Open
@SophieH

Description

Tested versions

Reproducible in v4.2.1.stable.official [b09f793]

System information

Dual Shock 4 (PS4 controller) + other controllers (I used xbox, PS5, etc). Copied info: Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz (4 Threads)

Issue description

With multiple controllers connected, if one is a PS4/DS4 controller, other controllers' analogue inputs for an action shared by the PS4/DS4 will often be ignored when getting the action strength.

Getting the action strength seems to behave correctly exactly when a controller changes its axis value, but the action strength quickly zeroes again, presumably related to how 'flickery' the raw DS4 analogue input is.

To be clear:

  • digital (non-analogue) inputs are not interrupted
  • playing with a controller is fine if the DS4 is not connected
  • playing with a DS4 is fine even if other controllers are connected
  • using Input.get_joy_axis() behaves as expected even when the DS4 is interfering with action strength

I assume this is related to a previous bug where the PS4 controller would make keyboard input actions cut out despite being stronger. It may have existed then too and just not been noticed.

sorry if this report isn't the best, I'm not used to doing this! I'll help more if I can.

Steps to reproduce

Attach my code to a label, have a "Left" action in the InputMap with an event listening for analogue stick left.
You'll need the PS4/DS4 controller and at least one other kind of controller, both connected.

You'll notice the "Input Action" will frequently go to 0 when using a non-DS4 controller while the DS4 is connected, and works fine if the DS4 is unplugged. The DS4 itself seems to work fine.
As you can see from the get_joy_axis() values, all controllers are reporting their values correctly, the issue is with the action strength.

Minimal reproduction project (MRP)

extends Label

func _process(delta):
	var actionName = "Left"
	# cuts to 0 sometimes if a DS4 is connected:
	text = "Input Action:" + str(Input.get_action_strength(actionName)) 

	# inputs from specific gamepads still report correctly
	var events:Array[InputEvent] = InputMap.action_get_events(actionName)
	var analogueInput:InputEventJoypadMotion
	for e in events:
		if e is InputEventJoypadMotion:
			analogueInput = e

	for j in Input.get_connected_joypads():
		text += "\n" + Input.get_joy_name(j) + str(Input.get_joy_axis(j, analogueInput.axis))

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions