How to work with bluetooth joycon?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By slacke

I have Dualsense wireless controller.

When I connect to PC with usb, Godot can detect the input event just fine.
but when I connect with Bluetooth Godot couldn’t detect any input.
Any other game can detect my wireless controller just fine.

how I detect input

 if event is InputEventJoypadMotion:
		if event.axis == 0:
			text1.text = str(event.axis) + "\n" + str(event.axis_value)
			leftHStr = event.axis_value
		if event.axis == 1:
			text2.text = str(event.axis) + "\n" + str(event.axis_value)
			leftVStr = event.axis_value

Are you connecting the bluetooth controller before or after starting your game?

Additionally, if you wire up the joy_connection_changed signal, does it provide any useful information?

See here for some additional info.

jgodfrey | 2022-08-30 22:58

I added the code from your link. and here is the result.

>Open game, then Connect controller with Bluetooth.
It print PS5 Controller
I get InputEventJoypadMotion for 1 frame. and that’s it. nothing come out after that.

>Connect controller with Bluetooth, then open game
nothing is detect.

Honestly I think this is game engine bug. but I will provided info in case anyone want it.

slacke | 2022-08-31 02:11

Your above tests seem reasonable to me. That is…

  • I’d only expect the joy_connection_changed to fire once when a joypad device is connected or disconnected
  • I wouldn’t expect it to fire at all if you’ve connected the device prior to starting the game.

So, that all sounds as expected. I assume that in either case your bluetooth-enabled input device still doesn’t work in Godot? If so, I really don’t have any other input…

jgodfrey | 2022-08-31 21:55