Download

Character and a camera can spawn without being instructed to do so!!??!!

Hi,

Ok here’s my problem. I’ve setup a simple scene in my map that I use as a “backdrop” to my menus made with UMG. In the scene I use my own camera (blueprint/C++).

At first, It was using my camera, when I pressed play, but I noticed that it spawned a character even if I did requested one or that I didn’t even used a player start in the scene. So I looked at the settings in my character blueprint and disabled auto possess Player and AI. But still a character would spawn in my scene. Now the part where I am banging my head on the wall or any other surface for that matter, is that I changed other settings and now an additional camera is spawned in my map and is being used!

Why is it that a character and a camera can spawn without being instructed to do so? And how to I get ride of that without affecting my other scenes?

thanks,

Honestly, you can’t without changing the source. Every scene in UE4 is guaranteed to have a player controller and a viewport (and thus a Camera). Without these things, many UE4 services cannot run because they rely on the PC or viewport to know which object the game world is.

If you want to handle the Camera yourself, you should use “Set View Target with Blend” on your PC passing in a reference to the camera you want to use. You can also make a new pawn that has no input or disable input on the auto-created pawn. But there will always be a Player Controller and a Camera. Always.

Thanks for the information I think I know what I will have to do…

Ok so here’s what you need to do. You need to open up the default settings of the game mode. I think you can get away with just checking the ‘delayed start’ option as that will not spawn you in automatically (Yes your player will still have a player controller as it needs that but it will not posses a pawn and pawn will need to be manually spawned). Another thing you can do is set your default spectator class and check the box which spawns players in as spectators. So if you want to show a camera perspective you can use the ‘set view target with blend’ node on a camera actor in your level from your spectator blueprint. This is actually exactly what I do.