How to spawn player in after begin play logic is complete for a blueprint?

I have a random dungeon generator and it generates the dungeon on begin play. Part of the dungeon is spawning in the player start. How do I delay spawning in the player and camera after the dungeon is done building? Only thing I could get to work is spawning in the actor from the player blueprint, but the camera that spawned in on initial load is taking priority instead of the one attached to the actor via SpringArm causing the camera to be wonky.

Rather than letting the system spawn the player, because it’s in the game mode, you can just decide when you want to spawn, and then possess.

Presumably after the central part of the dungeon has formed.

1 Like

I already set the Default Pawn Class to None. That doesn’t stop the CameraActor from spawning in and replacing my later spawned player camera which is attached to the player actor.

image

Spawning in the player via spawn actor from class does work to let me spawn them in, but it doesn’t solve the camera problem.

Are you possessing? That should sort out the camera problem.

( Also, maybe remove the spectator class pawn from the GM ).

Ok, I got it working. Had to set Default Pawn Class to None in my GamePlayMode AND globally in project settings. Next I removed PlayerStart actor from my map and replaced it with just a regular actor BP that spawns actor from my player class. That seams to work fine.

As for possessing yes I’ve already set Auto Posses Player to Player 0.

3 Likes

I am interested in your method. How do you go about doing that exactly?

As in this post