Disable move/look input for clients in multiplayer

Hi guys,

I’m trying to disable the move/look input once a player connects to a game session but I’m having trouble getting this working on connecting clients, but it’s working fine for the server-client.

The player controller triggers the pawn to be spawned on the server within the game mode class, and I’m trying to call TogglePlayerInput() on the spawning controller to disable input.

I’m aware that the game mode only runs on the server but I’m having difficulties getting this to work using alternative methods e.g. client RPCs. Does anybody have any ideas on the best way to implement this? I’ve included some of my code for the controller/gm for reference. Any help is much appreciated.

PlayerController:

GameMode:

Try making the request from the game mode to the game state to player controller. You could trigger this in the game mode from the Post Login or Event Handle Starting New Player. Pass your controller reference to the game state and cast to that player controller and then toggle your player input.