Spawn As A Default Player Character

When I start the game I want to spawn as the default player character. This works if I play in editor. When I play the packaged game or Standalone game, I spawn as a spectator. I set:

	bStartPlayersAsSpectators = false;

In the constructor of MyGameMode class. But I still spawn as a spectator, I also never am able to leave spectating mode. Is there something I am missing?

Hey Janyx,

If I’m understanding your question correctly, you’re looking to set your character class as the Default Pawn for your Game Mode.

Here’s an example of my game mode’s constructor where I did this with my player class:

AMainGameMode::AMainGameMode()
{
	DefaultPawnClass = APlayerCharacter::StaticClass();
}

This will allow you to set the Default Pawn, which is the class that you will automatically possess upon entering any play mode. You’ll just need to replace APlayerCharacter with whatever the class is that you’d like to be your default pawn.

Let me know if that’s what you’re looking for.

Have a great day

Thanks for the reply. unfortunate that isn’t my question. I have the default pawn set. the problem is when I start the game I don’t spawn as the default pawn I instead spawn as the default spectator.

Like I stated above this is only happening when I play the package version or standalone game. PIE works correctly.