Hi,
How can i detect from what device input is coming?
Like: keyboard and mice, xbox controller, PS controller or etc
Thanks in advance,
Hi,
How can i detect from what device input is coming?
Like: keyboard and mice, xbox controller, PS controller or etc
Thanks in advance,
make an input action for left joystick (and you can add any other controller inputs as well) and make a second input action for wasd (or mouse or other keys) in the player blueprint, when the input action for the controller is used, set a boolean variable called UsingGamepad to true. when the input action event for the keyboard one is used, set that boolean variable to false. You can use branches with that boolean anywhere else in the blueprint where thats needed
FYI - This fires ALL THE TIME - with 0 Gamepad hooked up to the PC. This method doesnt workâŚ
Since all of the answers for this question i found were trash hereâs mine:
In UE 5.3, using the Input Device Subsystem worked really well for me:
The Hardware Device Identifier comes back telling you the specific gamepad, if you want to switch between PlayStation and Xbox controller specific UI. For example, the keyboard and mouse returns âKBMâ and an Xbox controller returns âXInputControllerâ.
Thatâs so important, I canât believe it didnât exist until version 5.3.
Thank for your hint!
On any key event you can call âis gamepad keyâ or âis keyboard keyâ ectâŚ
Unrealâs input system is a joke (havenât tried the Enhanced one yet).
PS: to save you the head banging - this function returns invalid result if the device NEVER made any input (because the data is populated on a button press for example). So Unreal knows there are devices, but doesnât know what they are⌠brilliantâŚ
God bless you <3