I’m trying to make a local split-screen multi-player game. I’ve already created my own character class that moves with keyboard input. I’m now creating a customer gameMode that will ad multiple players. I’ve successfully created two characters, the first class is being created by using the super::BeginPlay, the second being created using:
FString error1;
GEngine->GameViewport->createPlayer(1, error1, true);
Running the game with this game mode results in a split screen with one character that is controlled by the keyboard, and a second character that does not move at all.
I suspect the problem is that I need to setup or define input for the second controller (controllerID 1). Currently the only method I know to define this is within the editor under project settings>input settings.
This leads me to believe that the only way of accomplishing multiplayer support is to create a second constructor within my custom character, which takes a list of strings that I can use to define which actions/axis the character should ‘listen’ to. This method doesn’t feel right to me, as it would require me to also modify gameviewport and possibly a few other files.
Does anyone have any advice?