Godot Version
4.2
Question
I’m trying to implement Steam Input in my game and most GodotSteam functions require an input_handle parameter, but I can’t find how to get one.
I tried getConnectedControllers() which returns an empty array and getControllerForGamepadIndex() which returns 0.
Inherits: Object A singleton for handling inputs. Description: The Input singleton handles key presses, mouse buttons and movement, gamepads, and input actions. Actions and their events can be set ...
Look at get joy guid (globally unique identifier) I think this is what the steam input_handle wants.
It requires a device number you can get that by calling Input.get_connected_joypads()
Then your input device may not be in SDL2 database, that input_handle is just a number, and zero is a number.
Did it return a string “default gamepad” like the description says?
No, it says __XINPUT_DEVICE__
After switching my gamepad to DirectInput mode get_joy_guid() returns 030000006d04000016c2000000000000 but that’s not an int and thus not accepted as input_handle.
Which gamepad do you have exactly?
Displays info about all gamepads connected to your computer. Check buttons, joystick axes, drift, and more. Works with all controllers and joysticks in a modern browser.
How does a web browser recognize your gamepad? Google Chrome even supports my old Xbox controller via USB without installing drivers on my MacMini. (Godot can’t do that yet)
I have a Logitech F310, both Chrome and Firefox detect it.
Also in Godot is_joy_known() returns true but only in XInput mode.
Never mind, found the problem myself. I just needed to use runFrame()
system
Closed
January 9, 2024, 9:23pm
12
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.