You might notice that when the game starts, the host’s player is spawned at the correct spawn point, but the client’s player is spawned at the origin.
The bug happens due to the multiplayer_authority… the server cannot set the position of the client player.
The easiest fix I could find is to set the MultiplayerSpawner.spawn_function property and use the MultiplayerSpawner.spawn() method to run code on both the client and host:
Thanks for the solution, that worked.
However, I can’t see how they are being added to the PlayersContainer, since that line was removed, yet they are still being added to it?
Also I wonder why this fault occur in the tutorial.
Nicely done, I fussed with this for too long to admit to! Thanks a bunch. I can confirm this also works later in the lectures when we turn the player selection into an array. The only difference being in the spawn_player function as follows:
Thank you so much for this. I was going insane trying to figure this out. I was trying all sorts of things like having the Index be pulled from the server. And everytime the console showed me that it pulled the correct Position but the Player was still spawning at the same spot everytime unless I turned of the synchroniser completly. And now I can finally start making my own game