Customize spawn location without the PlayerStart object

I have a PlayerController controlling a Pawn. I can successfully set the spawn location using the PlayerStart object. However, I would like to avoid using PlayerStart because it uses a capsule collider, whereas my Pawn uses a sphere collider. Because the capsule is taller than the sphere, the Pawn drops to the ground when the game starts. I would like it to sit on the ground when the game starts.

1. How can I change the PlayerStart collider from a capsule to a sphere?

or…

2. How can I set a custom spawn location without using the PlayerStart object? Without the PlayerStart object the default spawn location is 0, 0, 0 and I don’t see how to override this.

I think you’ll find, that when you spawn without the player start, the player still sort of ‘lands’, it’s just the way it works. I think it’s possibly to avoid going through the floor.

It’s hard to say how you’ve got your level set up but, you can delete the player start, change the game mode to not spawn your player, and then spawn the where you want from the level BP.

2 Likes

@ClockworkOcean that was a great suggestion, thank you. I was able to use the Spawn Actor node and Possess node to create a new Pawn and take control over it. I added a Make Transform node to specify where the Pawn should spawn. Two follow up questions:

  1. The Possess node seems to be designed for network play (my game is local only and single player). Is there an alternative way to possess a Pawn?

  2. The game automatically produces a controlled Pawn, so when I manually spawn and control a Pawn (as described above), the result is that there are two copies of the Pawn in the game world. How would you suggest avoiding this issue?

Screenshot of player controller.

With a bit more searching I found a solution. I believe the best approach is to delete PlayerStart and instead drag the Pawn into the world and position it where desired. Then, go into the Details of the Pawn and find Auto Possess Player and set to Player 0. The result is that the game will auto-possess the Pawn when the game starts.

Here’s the source for this approach.

2 Likes