works fine, but one strange thing is that my first character (the one getting possesed) seems to depend on how my viewport camera is orientated when i play? it always possesses the left one? meaning i get a different character possessed depending on with side the camera is on?
It’s possible that the issue you’re experiencing is related to the default player start in your scene. When you have multiple player starts in your level, Unreal Engine will use the one that is closest to the camera or the one with the lowest player start index.
To ensure that the correct character is being possessed when you start the game, you can try setting the player start index for each player start in your level. To do this, select the player start actor in your scene and look for the “Player Start Index” property in the Details panel. You can then set a unique index for each player start in your scene to ensure that the correct character is possessed.
Another thing to check is the order of the players in your project settings. Go to Edit > Project Settings > Maps & Modes > Default Modes and make sure the order of the players is correct. You can drag and drop to reorder the players, and the first player in the list should be the one that gets possessed by default.
Finally, make sure that you are correctly setting the player controller for each character that you spawn. It’s possible that the player controller is being assigned to the wrong character, which could cause the behavior you’re seeing. You can set the player controller by calling the “Possess” function on the player controller and passing in the character you want to control as an argument.
My controller 0 does end up possessing character 0 and controller 1 character 1 though, just seems that, having a red and blue character, sometimes i control blue and sometimes red.
I apologize for the confusion. The “Player Start Index” property is only available for the legacy “Player Start” actor in Unreal Engine 4. If you’re using the newer “Player Start 2D” or “Player Start 3D” actors, they don’t have a “Player Start Index” property.
Instead, when you have multiple player starts in your level, the engine will use the one that is closest to the camera or the one with the lowest player start priority value. You can set the player start priority value by selecting the player start actor and looking for the “Player Start Priority” property in the Details panel. You can then set a unique priority value for each player start in your scene to ensure that the correct character is possessed.
Another option would be to use Blueprint logic to choose which player start actor to use based on certain conditions. For example, you could use a variable to keep track of which player start was used last and choose a different one for the next player.
I do find the Input priority, but setting them to 0 and 1 still makes it randomly switch going in and out of play a few times.
Would setting the controller id in the Create Local Player node make any difference?
or should i just set it after this node in some logic like you suggest?
It was answers from ChatGPT. I think you need to make an array of your “Player Start Points” and variable “Last Start Point”. And next is pretty much straight forward.
Still having this issue, the controller spawned by the game mode is randomly choosing one of the player starts. Is there anyway of getting control over which PlayerStart gets used by the GameMode to spawn the PlayerController?