How to assign different characters to Player 1 and Player 2 in multiplayer (UE5)

Hi everyone!
I’m working on a multiplayer project in Unreal Engine 5 using the Top Down template. I want to assign Character A to the first player who joins the server, and Character B to the second player.

Right now, all players are spawning with the default character. I’ve read that I might need to override PostLogin() in GameMode, but I’m not sure how to properly spawn different characters and possess them per player.

Can someone please explain how to implement this logic, ideally with an example

Hey @Poor_Game, how are you doing?

What you’re requesting isn’t too complex.

Create your own GameMode blueprint and implement the GetDefaultPawnClassForController function.

In that function, you can return the class of the pawn that each controller should use. One simple approach is to use a counter to track how many players have joined, and based on that, return Character A’s class or Character B’s class