Player start point issues in standalone caused by loading time

I was going to post a question, but I ended up figuring it out. I still want to post this just for documentation’s sake in case another beginner dev has this problem when they start to play with level streaming.

Blockquote To set the scene, I’ve set up a test level for level streaming. I have a player start actor in the persistent level, and one of the streaming levels is set to be initially loaded. When I play from the main menu in PIE, the player spawns correctly. When I play that persistent level in standalone, it works correctly. But when I start from the main menu in standalone, the player spawns in the right spot, but about 1 meter below where they’re supposed to be. The correct player character is loaded, the game mode options are all correct, but the player always spawns about 1 meter below the start point.

It turns out this was a very simple problem. My player spawned before the level did and fell through part of it. I put a plane under the spawn point in the persistent level to test this. Sure enough, no more getting stuck in the floor.

I know this probably seems like a no-brainer, but it’s basic issues like this that have made the Unreal Engine learning curve much steeper for me and wasted so much of my time. Being someone who knows nothing about C++ and doing all of this for the first time, I never think about things like this, and I don’t see much documentation around it. So I hope someone finds this useful!

2 Likes

Thats not a viable solution.
You have no guarantees that the block will spawn before the player.

You need to (search the forums for the right answer and)

  1. prevent simulate physics.
  2. keep the loading screen on.
  3. test for the spawn point with sweep to see if it makes sense or not.
  4. once a spot is found you can enable simulate physics which will drop the player - and remove the loading screen.
1 Like

No, it’s not a viable solution, that was just a quick test to make sure that was the issue. What I’ll probably end up doing is finding a way to bind the loading complete event of the initial streaming level, so that I can completely lock the players movement by default and unlock it once loading is done. Or make an object or proxy that does it for me.

Sorry, should have clarified that. If anyone is having this issue a plane is not a permanent solution.

2 Likes