I'm new to pygame. I need to make a DualShock 4 controller rumble via BlueTooth. I know that the .rumble(low_frequency, high_frequency, duration)
makes the controller rumble, and it works for me, but only when I connect my DualShock4 via USB. When I connect it with BlueTooth, the function returns False, and it doesn't work. Why is this, and how do I fix it, if possible? I am on Windows 11, and all my bluetooth drivers are up to date.
Asked
Active
Viewed 121 times
0
-
1Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Apr 21 '23 at 16:53
1 Answers
0
I found the solution. If I add these two lines of code:
import os
os.environ['SDL_JOYSTICK_HIDAPI_PS4_RUMBLE'] = '1'
The rumbling works, even via BlueTooth. Check this Reddit answer for more details: https://www.reddit.com/r/pygame/comments/12twl0e/cannot_rumble_dualshock_4_via_bluetooth_in_pygame/

Habeb
- 1
- 1