Mutliple generic usb controller

I am building a local multiplayer game. I am using the create player node to spawn new players, then spawning characters on the map and then using posses to assign the controller to each character.

Problem is the first player controller receives the input from all my gamepads and keyboard, while the others don’t move. I’m using only one Xbox controller and the other 2 are Generic USB controllers.

Does unreal have trouble assign gamepad to controllers if they are not Xinput?
Is there any plugins to help me?

Is there anyway to manuaaly say which gamepad controls each player controller?

I’m looking for any solution from c++ to blueprints.

Hi @Xadex, the Raw Input Plugin might help you here. I did play with this some time ago. It is definietly an adventure and requires lots of experiments. Some basic stuff goes here - checking my personal documentation. Not relating to multiplayer but to the ‘generic’ stuff.

Here you can define configurations depending on USB Vendor and product IDs

You can find those IDs in windows device manager

grafik

It’s now up to you to detect the correct inputs. The showdebug rawinput console command can be useful. It does some output like this:

It can be somewhat tricky to find the correct mappings. For example, the steering wheel reports key events for left/up/down/right as axis values for a Gembird Steering Wheel. I found this by experimenation:

grafik

If nothing pressed, it did report 2.142857…

This can be helpful: Some blueprint for getting Button events: Use Any Key event and play on the device. This returns the Key name configured in the corresponding array location (filled with GenericUSBController Axis and Button names in the default configuration)

I did quite some experiments with this some time ago, did get it work with a drivable car for example with an old Gembird Shockforce-M steering wheel and an old Bullfrog SL-6540 Gamepad. But for example a Saitek Joystick Cyborg Force did fail completely - could not be detected by USB.

I’d need to check my project for more details, but basically you can try to go with that.

EDIT: a table like this can be useful to document the found mappings

2 Likes

Thanks, that helped a lot with the inputs!

But the main problem i have is this:
I have 3 gamepads connected to the game.
On the game mode begin play i spawn 3 player controllers and their respective characters.
They all show up in game, but all gamepads control only the first one spawned. So it does not matter which controller I press the jump button, they all control the same character.

I’m sorry, as I said, this was only some tip on the input handling, but I never had multiple controllers with multiplayer connected - so unfortunately I have no experience with this to be able to help you, but at least, if was helpful regarding the input part itself.

1 Like

O kay so after some hours of research it seems that all of this gamepad assign logic is not exposed to blueprints. So if you want to change it you need to dive into C++.

Now, i found this plugin on the assets store that solved my problem and saved a lot of time, so if you want to handle multiple inputs from multiple controllers check it out.

2 Likes