I am currently testing a game where a listen server is host to one client. The server hosts a lobby that the client joins, then they travel to a level. Each player spawns a character that is automatically possessed.
The server’s pawn moves happily about on the server, and this is replicated perfectly to the client. The client’s pawn does not move at all on either client or server. A print string has shown that the client’s pawn does receive movement on the left-stick of the gamepad, it just doesn’t translate into anything when this is plugged into an “Add Movement Input” node.
Here is a list of things that I have tried:
- Checking that the pawn is possessed by the correct controller: it is.
- Checking if move input is ignored on the client pawn’s character movement, pawn or player controller: it isn’t.
- Checking that the pawn is owned by the client: It seems to be, though the printed owner appears as “IDL_PlayerController_C_0” which is the same on both machines. I know that each instance of the game will have the first player controller named as “C_0”, but this means I can’t be sure if the pawn is definitely owned by the local player controller.
- Bruteforcing the ownership of the pawn: on event begin play the pawn is set to be owned by its controller. This is run on the server and multicast to each player. It appears to work, as before the pawn appeared to have no owner. This hasn’t changed anything about the pawn being able to move however.
I’m really stuck at what to do next. This pawn is a refactored asset that is based on a less-efficient but perfectly functional pawn I was using previously.
This issue seemed to appear once I had overridden the “Ready to Start Match” function in the game mode. Perhaps it is something to do with me doing that incorrectly.
Any suggestions or questions about this situation would be much appreciated. I’m ready to post screenshots of things that people would like to see; but as I mentioned a lot of things I didn’t want to flood the post with possibly irrelevant screenshots.
Thanks very much for your time!
Edit 1: I have since deleted the overridden “Ready to Start Match” function in the game mode to test my theory. The client player still cannot move in builds of the game.