godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.07k stars 21.18k forks source link

Vibration not working on 'Nanco PS4 Revolution Pro Controller' #89136

Open chris-villarroel opened 8 months ago

chris-villarroel commented 8 months ago

Tested versions

System information

Godot v4.2.1.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Laptop GPU (NVIDIA; 31.0.15.2824) - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)

Issue description

I am experiencing an issue with the Input.start_joy_vibration function in Godot Engine, specifically when attempting to utilize vibration features during gameplay. This problem arises exclusively when using the Nacon PS4 Revolution Pro Controller. Despite correctly implementing the vibration code, no feedback is observed with this particular controller.

However, when switching to a PS4 DualShock controller paired with an 8bitdo USB adapter, the vibration functionality operates flawlessly, indicating that the issue is not with the code itself but rather with compatibility between the Godot Engine and the Nacon controller.

Further investigation into this matter revealed that the Nacon PS4 Revolution Pro Controller functions as expected in other Steam games, providing proper vibration feedback. This observation leads me to believe that the root cause is a specific compatibility issue between the Godot Engine and the Nacon controller.

I have also conducted a thorough search on Google and reviewed the existing issues on this repository but found no mention of similar problems with the Nacon PS4 Revolution Pro Controller, though there are reports for other controllers. This absence of reports suggests that the issue might not be widely recognized or reported yet.

I am reaching out to the community for insights or solutions regarding this compatibility issue. Any assistance or guidance on resolving this problem would be greatly appreciated.

Steps to reproduce

extends  Node2D

func _process(delta):
    Input.start_joy_vibration(0, 1, 1, 1)

Minimal reproduction project (MRP)

extends  Node2D

func _process(delta):
    Input.start_joy_vibration(0, 1, 1, 1)
AThousandShips commented 8 months ago

Does it work if you just start vibration once, with for example a button, the fact that constantly updating vibration like this works with one controller doesn't mean it is another controller that has issues, to ensure this isn't the case please try with a limited vibration period triggered by a button press for example, see here

chris-villarroel commented 8 months ago

Thank you for your suggestion. I've already attempted to initiate the vibration feature using a more controlled approach, specifically by triggering it with a single button press to activate a limited vibration period. Unfortunately, this method also did not yield any vibration feedback when using the Nacon PS4 Revolution Pro Controller.

extends  Node2D

func _input(event):
    if event.is_action_pressed('disparar'):
        Input.start_joy_vibration(0, 1, 1, 0.5)
bruvzg commented 8 months ago

If I remember correctly, currently used API (XInput/DirectInput) only support vibration for the XBox controllers (and controllers pretending to be XBox controller).

Yurinka commented 4 months ago

I experienced the same issue in Godot 4.2.2 and Win10. My Xbox controller (in particular the XBO controller connected via usb) works in the editor, it rumbles.

DualShock4 (standard PS4 controller) and DualSense (standard PS5 controller) instead don't work, they don't rumble.

I'd say that vibration is limited to Xbox compatible gamepads, or it's broken for non-Xbox compatible pads. Which sucks, because I think PS3, PS4, PS5, Switch oficial gamepads should work in Windows.

frankhuurman commented 4 months ago

Experiencing the same issue with the Google Stadia controller connected through bluetooth. Everything works except triggering vibrations on Godot 4.2.2.

Think I have to create a separate issue for that since it's a different controller. edit, made the issue: https://github.com/godotengine/godot/issues/94265