Hi, I am working on multiplayer project and I need position of all players for logic. I have my specific actor for them so I know getting all actors of that type is one option, but I dont think it is good one, because I need it to be dynamic (player leaves/joins, it updates automatically) and it is highly likely I´ll be working with the positions every frame so that may be another problem.
Make sure you call the parent method via Super:: in your overriden method especially in PostLogin as that calls RestartPlayer which I had to override (and NOT call the engine’s method) so that I could use AdjustIfPossibleButAlwaysSpawn as my spawn parameter. I then had to copy some of the engines RestartPlayer functionality into my method and assign the pawn to the controller.
LogSpawn: Warning: SpawnActor failed because of collision at the spawn location [X=0.000 Y=0.000 Z=0.000] for [Vessel]
LogGameMode: Warning: SpawnDefaultPawnAtTransform: Couldn’t spawn Pawn of type Vessel at Rotation: Pitch 0.000000 Yaw 0.000000 Roll 0.000000
Is it possible that the first pawn blocks the rest from spawning? If so how can I fix this?
That error is the reason I overrode the GameModeBase’s RestartPlayer method so that I could specify the parameter the the SpawnActor call to always spawn. Well, and to be able to specify the location of where the player is going to spawn.
Thanks for explaining! By the way I fixed my issue with pawns blocking the rest of pawns from spawning by setting my PlayerStart to allways spawn. Stupid problem to begin with but I guess I learned that at least.