Hey guys, so I came into this issue and tried for about 5 hours straight to solve it with no luck whatsoever. Basically, I followed the Blueprint Multiplayer Tutorial to a tee (with the exception of the chat windows in the gameplay map), but no matter what I try I cannot get any input through to my pawn once I get into a gameplay map. The server and clients can affect the pawns just fine in the lobby map, but once they server travel into the gameplay maps none of them are affected by any input. I know they are being possessed because I already debugged that.
Please someone help me. I’ve been working on this project for almost a year and it’ll kill me if this is what kills the project. I’ve attached images of my Game Mode and Player Controller for the gameplay map so you guys can take a look at the blueprints. If you need anything else to solve this I’m more than happy to provide.
The server and connected client’s pawns are able to receive input just fine in the lobby map. However, once I ServerTravel to the gameplay map not even the server can control their pawn. What is happening? Are there other Player Controllers that are spawning? Are the Player Controllers just not lining up with the right pawn?
So there’s a few things off the top of my head you can check.
First, on your server game mode and do a GetAllPlayerControllers, and see how many player controllers there are. There should be exactly the same amount as the number of players you have. Only 1 of those PCs should be ROLE_AUTHORITY, rest should be ROLE_AUTONOMOUS_PROXY. Check that first
Assuming you have PCs, check that each PC possess a pawn. There should be a method called PossesedBy on PCs that possess a pawn. I know you said you’ve debugged that but you should make sure this happens post ServerTravel
Also, there is a method called AGameMode::PostSeamlessTravel, and also another called APlayerController::PostSeamlessTravel as well. Make sure those are called for your servers and clients post server travel (Assuming you are using seamless travel, which you should). You can set to use seamless travel in GameModes by checking the bSeamlessTravel flag
The way inputs are setup in PCs is by calling SetupPlayerInput. Make sure that is called. If it’s not, check through steps 1-3 to see what’s amiss
Note that those methods I’m talking about are all C++. But it should be easy to get an event to fire when they are called in Blueprints as well.