Operating system or device, Godot version, GPU Model and driver (if graphics related): 1c0007b commit from master branch, Linux Mint Mate 18.2 x86_64
Issue description: (for example) Input.start_joy_vibration(0, 0.5, 1, 5)
don't do anything. Tested with connected PS, XBox and Steam Constrollers.
Bugsquad edit (keywords for easier searching): vibrate, gamepad, joystick
Works for me on Windows 10, with an Xbox 360 controller. Might be Linux only.
The controllers are successfully connected, the control works without unnecessary movements. Vibration works on Steam, but not in Godot.
Tested on Mageia 6 x86_64 (Linux) with the same commit and my two controllers work fine:
Ubuntu 17.10 x86_64
Microsoft X-Box One Pad
Godot 2.1.4 (Steam) and Godot 3.0 Beta 1
Joypads Demo - Start Vibration
... works for me
Hm... I try check demo project little later, maybe I just use method not right.
Okay, only Steam Controller via SC Controller app works with vibration. Others - worked and finded by godot app, but vibration doesn't work.
We have now entered release freeze for Godot 3.0 and want to focus only on release critical issues for that milestone. Therefore, we're moving this issue to the 3.1 milestone, though a fix may be made available for a 3.0.x maintenance release after it has been tested in the master branch during 3.1 development. If you consider that this issue is critical enough to warrant blocking the 3.0 release until fixed, please comment so that we can assess it more in-depth.
We need more information on what exact controller models and setup do not work, as so far nobody could reproduce those issues.
I am here to bring an exact setup for my controller. I am using MacOS Mojave 10.14.6 with a Dualshock PS4 Controller I bought at Walmart.
The controller vibrates when told to by Steam (Identify Controller Feature). The model number of the controller is CUH-2CT2U. It is an official Sony controller.
Using the System Information app on my Mac, I found this info (Bluetooth).
PS4 Controller:
Address: 90-89-5F-B8-64-E5
Major Type: Peripheral
Minor Type: Peripheral
Services: Wireless Controller
Paired: Yes
Configured: Yes
Connected: Yes
Manufacturer: Unknown (0x7, 0x00)
Firmware Version: 0x0100
Vendor ID: 0x054C
Product ID: 0x09CC
Class of Device: 0x05 0x02 0x2508
AFH: On
AFH Map: F0F719000370807D
RSSI: -42
Role: Master
Connection Mode: Active Mode
Interval: 0 ms
Host Connectable: No
EDR Supported: Yes
eSCO Supported: Yes
SSP Supported: Yes
@akien-mga
Not getting vibration from PS4 controllers on Windows builds. Checked and still present in 318c69351.
I have had this issue for as long as I have been using Godot. Reluctant to report, since it seems like there are no longer active contributors for this area of the engine.
So the following line does nothing for me, but will work if I use an emulator to emulate an XBox controller.
Input.start_joy_vibration(0, 1.0, 1.0, 1.0)
My details are:
Win10 64-bit
Joypad - Sony DualShock 4
GUID - 4c05cc09000000000000504944564944
Note that--on Windows--vibration relies on the XInput API which the official docs describe as "allows applications to _receive input from the Xbox Controller_ for Windows"--i.e. at least officially, it's not a generic controller API.
I notice that SDL haptic support includes XInput & DirectX Input support on Windows, so adding additional controller support via DirectX may be possible.
Related issue: https://github.com/godotengine/godot/issues/30256
Related links:
My Steam Controller-specific research from researching an answer to this "Steam controller vibration" query.
(Steam Controller controllers require specific haptic software (& firmware) support.)
Other related SDL source code links:
At least for Windows, controllers need to be emulated as an XInput device. I tested with my DualShock 4 controller on Windows 10 and it didn't work, however when I used DS4Windows, which turns your DS4 into an emulated Xbox controller, it did work.
DS4Windows seems to use the ViGEmBus driver for it's emulation, perhaps that could be a place to look.
Most helpful comment
Note that--on Windows--vibration relies on the XInput API which the official docs describe as "allows applications to _receive input from the Xbox Controller_ for Windows"--i.e. at least officially, it's not a generic controller API.
I notice that SDL haptic support includes XInput & DirectX Input support on Windows, so adding additional controller support via DirectX may be possible.
Related issue: https://github.com/godotengine/godot/issues/30256
Related links:
My Steam Controller-specific research from researching an answer to this "Steam controller vibration" query.
(Steam Controller controllers require specific haptic software (& firmware) support.)
Other related SDL source code links:
http://hg.libsdl.org/SDL/file/78754c9488f6/src/haptic
http://hg.libsdl.org/SDL/file/78754c9488f6/src/joystick
http://hg.libsdl.org/SDL/file/78754c9488f6/src/joystick/steam