InputPlayer components and Keyboard/Mouse Combo

I’m playing with the new preview-0.2.8 components, and I am a bit confused (although there’s obviously a lot of ambiguity in this area). I’m trying to set up players with the assumption that a single player would have keyboard and mouse, and the remaining players would be gamepad-based. In reality all of the players would likely be gamepad based, but I want to maintain the keyboard/mouse option for development (just so I’m not constantly picking up a controller once I have those controls tuned). Currently, with the PlayerInputManager component, it appears that there’s no way to have the keyboard and mouse register as a single player unit with the current components.

I’m not overly concerned about writing my own joining system for manually joining, but I just wanted to make sure I’m not reinventing the wheel here, as it seems like combined keyboard/mouse input for a single user would be a common use case. Did I miss some functionality?

1 Like

PlayerInputManager should handle this case just fine. Create an InputActionAsset with different control schemes, one for gamepad, one for Keyboard/Mouse. Then the PlayerInputManager will spawn players with the gamepad scheme active for each gamepad if a gamepad button is played, and a player with the keyboard/mouse scheme if a key or mouse button is pressed.

1 Like

Ah, cool! Thanks for that! Seems to work fine!

1 Like