Local multiplayer using the same keyboard
Hello, I am currently working on a 2D sidescroller game where two players can play and control characters on the same keyboard, one player using WASD and the other player using the arrow keys. I read that unreal does not really support having using the same keyboard for two players but I believe there are some workarounds to this? I have tried following some solutions i found but the main problem I face is that one character simply will not move at all. I am still fairly new to game dev and some solutions I found are not clear to me.
I would duplicate the BP of thr character and change the keys for input. This way it will only respond to the input specified for the 2nd player.
answered Jan 08 '19 at 02:14 PM
You need to create 2 sets of input. You only need 1 character bp.
You also need to route all the input from player 0 to player 1, as player 1 can't get input from the keyboard.
What I'm showing you id done in my BP_Character. Of which there are 2, one possessed by Controller 0, the other by Controller 1.
Yet, when player 0 gets the input from the set it's not supposed to use, it routes it to player 0.
Player 1 will not get any input from keyboard, so no need to check anything really.
answered Jan 08 '19 at 02:39 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here