Player not working

Alright so I added a Player but my player wont at that point it just spawns a camera that can fly through colliders. BTW I am in the realistic rendering scene.

Make sure the GameMode has the right classes set: Pawn, Controller, etc…

This probably sounds super nooby, but how would I find that? It’s not in the details of the Player Start…

No it doesn’t ^^ Unreal has it’s own ways and flows. The GameMode class used in each level features a set of base classes that will be used to represent the player: a PlayerController, a Pawn and a HUD for example. Those settings can be checked within the GameMode blueprint that is set for the level or the WorldSettings of the level where you can override them manually for each level.

It could be that the controller and pawn in that sample (I’ll download it later) are not using the correct classes.

Back to spawning, the GameMode class will try to choose the best PlayerStart to spawn your player. This is done using the following functions: FindPlayerStart and ChoosePlayerStart. What it does by default (you can override it in C++ if you like) is to choose the best PlayerStart where the player can fit in, if not you will get a warning like: Warning - PATHS NOT DEFINED or NO PLAYERSTART with positive rating

Make sure your PlayerStart is not overlapping with geometry. Like Moss said, if you look into AGameMode::ChoosePlayerStart_Implementation, you can see that it’s checking for EncroachingBlockingGeometry. That means if you place your PlayerStart where it overlaps with geo, then it will never be selected.

I found that dragging a PlayerStart into my level with a nondefault floor height put it 8cm below the ground (PlayerStart.z=91.999985 and Floor.z=0). I don’t know why.

Did You Choose Default Player In Change PlayMode And PlaySetting???

1)make a new game mode blueprint
2)open it and set default pawn to your player blueprint
3)compile and save it
4)click edit->project settings
5)and click on maps & modes
6)and set your new game mode blueprint as your default game mode

Christ, I found an answer to my problem by mistake, maybe it gonna work for others. It’s so hidden…

2 Likes

For anyone who is still looking for an answer, check the sizes. If your level is too small, player wouldn’t work. Cos I had a player start. I had a small level. Everything scaled down cos I don’t know what I was doing. When I created character BP it was the right size. When I dragged the char bp into the level it was half the size of the level. That’s when I knew I messed up. Check the sizes. Hope this helps!

I had absolutely no clue what anyone in this thread was talking about. This is all the issue was for me too. Thanks

Was same trouble - player was always spawned at zero point and ignored player spawn markers.
I use streaming world, and my mistake was that i add player marker inside streamed level. So, solution was to delete marker and add to streaming node.

In my case these log messages were being printed:

LogSpawn: Warning: SpawnActor failed because of collision at the spawn location [X=0.000 Y=800.000 Z=482.000] for [PacmanBP_C]
LogGameMode: Warning: SpawnDefaultPawnAtTransform: Couldn’t spawn Pawn of type PacmanBP_C at Rotation: Pitch 0.000000 Yaw 0.000000 Roll 0.000000

Changing the collision preset in the pawn BP from Default to Pawn fixed it.

If u have Streaming Level, you can use this setting.

285026-2019-08-14-21-39-15.png

THIS. I just lost like 2 hours or more, and all I had to do was move the Player ever so slightly up (I was messing with game modes, blueprints etc.). FAIL. They should put that player info as warning or error in the Ouput Log, so that it is easier to see.

If you have clicked “Simulate” you wont be able to play with your character > so click on “Selected Viewport”

289231-hhh.jpg

3 Likes

there’s another thread out there pages long about how Player States aren’t loading for some clients… turns out the default collision of Pawn fixed my problem with colliding on Player Starts. Thanks, gsteigert!

1 Like

Thought I’d jump in as this was wrecking my head for a few days. I messed around with all sorts of settings including everything mentioned here, but it had nothing to do with my character, control or level settings. I had implemented a saving and loading system that was putting the player in a predefined transform on BeginPlay. Fixed it by checking a boolean that sets to true when the player saves for the first time and using that to determine whether or not to move the character on BeginPlay

Thought I’d jump in as this was wrecking my head for a few days. I messed around with all sorts of settings including everything mentioned here, but it had nothing to do with my character, control or level settings. I had implemented a saving and loading system that was putting the player in a predefined transform on BeginPlay. Fixed it by checking a boolean that sets to true when the player saves for the first time and using that to determine whether or not to move the character on BeginPlay

It worked for me.