I have an issue in standalone game (and sometimes in viewport selected) . When i hit the play button the camera is stuck in 0.0.0 location and nothing works . Sometimes i have this issue in selected viewport mode too . I checked Gamemode and Player controller settings, all seems to be ok .
I know that Viewport selected and Standalone works differently . But i don’t know how to solve this issue .
Could it be bad positioning of a start point? (too low & clipping into a scene object)
is the character being properly possessed by the player controller in the effected level? (might be a world settings override for a specific level where the character could be set to none or default player character or spectator)
Hey there @PepponeTV! You’re in good hands with these two, but I’ll add just a bit of explanation as well. This issue commonly occurs when there’s no player start, an improperly placed one without it being set to spawn ignoring all collisions, or if your gamemode is not set to spawn the correct player. The last one you’d be able to see in PIE as that would spawn you with a default pawn as well.
And i don’t have a “PlayerStart” beacuse my player pawn have to spawn at point 0.0.0 of a spline … It works all this time because start point of my spline was on 0.0.0 location …
My Player Pawn is not spawned beacause i don’t call spawning in GM Blueprint … . Bad Habits with the Viewport Editor … That spawns automatically the default PlayerPawn in 0.0.0 i guess …
Now if i spawn my pawn player in GameMode and it works .
Have you thought about after spawing the player pawn getting the player controller and possesing the pawn manually. It may seem redundant but you are creating the pawn out of normal order.
You could also possess it in the on post login event (i think it was in gamemode) its the more sure way to guarantee correct possession. But you would also need to move the spawn process there (it can call a function with a return to keep the code clean)
Try moving the exact code to post login. But pass in the controller from the EventOnPostLogin in place of the player controller.
Also do a an isValid check if it’s finding the actors with the tag Start.
Maybe add a small delay before the Get All actors with tag node to be sure the level is fully initialized and the object with Start tag is present and ready.
You could add a print string to debug if it’s invalid.