How do I get two players to use the same keyboard to play a game?
I can spawn in both players, but I can only control one at a time. Depending on ticking and unticking skip assigning gamepad to player one, either player 1 or player 2 works, and each of them, works with the correct controls.
This is what I currently have setup:
Hi there,
I am assuming you want each player to use different keys on the same keyboard to play concurrently. I haven’t tried this on my machine yet, but could you do something like the following, using enhanced input:
- Create an Input Mapping Context for each player, where you map the keys they use to some set of Input Actions, e.g. IA_MovePlayerOne
- Each player Actor/Pawn/Character (however you have it set up) can be responsible for adding the relevant IMC, and binding the triggering of the various Input Actions to the applicable functions inside the class
- Then you would create your Local Players and spawn your Player classes as above, and with the IMCs added and all relevant functions bound they should just both work
Thanks,
Hayden
They each have their own IMC already, and both IMCs work correctly, but it keeps setting one of the players to use a controller when I want both on the same keyboard.