so i added some code that makes the controller vibrate but it didnt work
var current_controller: int = 0
func _input(event: InputEvent) -> void:
if event is InputEventJoypadMotion or event is InputEventJoypadButton:
current_controller = event.device
Sadly that controller is not supported yet. Desptie the PS4 using traditional rumble with hardware very similar to the XBox, it doesnāt seem to follow the same DirectInput standard.
maybe windows users cant feel vibration on some controllers because of the sdl library, but do you know any addon/ 3rd party software that brings vibration for all controllers
A lot of this boils down to hardware drivers; Sonyās controllers were designed for the PlayStation series of game machines, and AFAIK were never built to be xinput/DirectInput devices. The Linux kernel has fairly robust support for PlayStation controllers, which are exported as /dev/input devices. With Windows, xinput/DirectInput is the expected model, so what your Sony controller does is a question of how well the driver makes it look like a āstandardā xinput device.
i found a software that converts direct input to xinput but it will not be compatible for godot, that means, it will only work for me, directX is the perfect solution, but its a framework
You may want to try out DS4Windows to see if it works this way:
DS4Windows isnāt maintained anymore, but it should work on Windows 10/11.
Vibration works out of the box on my end on Windows 11/macOS/Linux with a DualSense (all in wired mode), but I donāt have a DualShock 4 to test.
In general, I recommend using the controller wired if possible, as some of its functionality is only usable in wired mode (this is especially the case for DualSense).