Download

I created character class blueprint do I need to setup player controller blueprint for Multiplayer?

I was working on trying to limit my rotations for a flight game and I came across player controller in my research. From what I read I need it for multiplayer games. Is this true?

Player controller is the basic controller to players. When someone joins to a server (dedicated or listened) its given a playercontroller to him, in Gamemode Blueprint you have on Post Login event, who gives u the controller that enters if u want server to handle new clients. If not u can edit your playercontroller class by Blueprints, when someone joins server that playercontroller spawn on him, and u can use that playercontroller to input and fire events. If u want to spawn a Character in Beginplay, u can Fire event to server to Spawn and possess that Character, or do it in Gamemode by Postlogin, who gives u the controller variable too. Player controller is the first of each game, which controls everything in ur screen :P. Gamemode is the server Controller (as saying)

If u have more questions feel free to ask.

Thank you. I appreciate it.

What do you mean “need for multiplayer”?

The PlayerController is accessible on the owning Client and the Server. It is never accesible from other Clients.
You don’t necessarily need to code your own PlayerController, since the Pawn may have input logic itself.

I am doing from 6 months ago a multiplayer game, and i have character creation and lobby in the beggining of connect to a server, done with playercontroller only. In my case, Playercontroller spawns on everyone who connects, so playercontroller is from clients, but is given from server at connect and obviously Server controls it. In fact, if u want to take variables traveling from menu to server u need a Savegame in local directory (even if playercontroller is server’s, u can execute events on owning client so you do local everything and u can load data, for example. From Gamemode u load variables from server folder.

Gz and thanks for the help, Raildex :stuck_out_tongue: