Why do I have 2 cameras and 2 player Controller???

Hi everyone,

I have a camera actor blueprint in my scene that I use to follow the player or any other target in the map. I also have a blueprint/C++ player controller. But when I press play, there’s a second camera actor and player controller that appears. It’s not being used or anything. But it’s quite annoying not knowing why!

In my scene, I only place a player start object. But thanks for the info, I will look into it.

:slight_smile:

So this is what I have in my world settings

and this is what I have in my game mode cpp file.

I still don’t understand why this is happening. As far as the camera goes, I don’t understand why there’s 2 of them. Is there a place where I can tell him to only use my custom camera?

Uhm, i am really not sure if i got this right.

You have a PlayerPawn/Character that derives from PlayerController? Is that even possible? Guess this was just a typo? :slight_smile:

Other than that everything is perfectly ok from my POV. When you start the game, the engine looks for a playerstart and

  • Spawns the character that you specified as DefaultPawn (which is the BP_Characters)
  • Spawns a PlayerController as specified in the Default Settings (which is PlayerController)
  • Spawns a camera that is defined somewhere in the Pawn maybe?

Did you actually put the Camera and BP_Characters manually into the level? This usually wont work with a playerstart actor, since with a PlayerStart everything is spawned on-demand and will always use the newly spawned classes for the actual game.

If you want to use your character and camera that you put manually into the level you cant really use a playerstart but would have to code custom stuff for that to happen.

Cheers,

&d=1436226020

This picture is not showing 2 Controllers. It is showing 1 PlayerCHARACTER and 1 PlayerCONTROLLER.

The camera could come from the BP_Character. Check if he has a Camera in his components.

So far, everything is correct. You simply misstook the Character for a Controller.

EDIT: Also this can’t be:

&d=1436229983

If the Pawn would derive from a Controller, you couldn’t set it as a Pawn. The DefaultPawn is a APawn* pointer.
It won’t accept a controller. I get the feeling that you have no idea what a Controller is. Controller is not the same
as a Character/Pawn. The Controller CONTROLS the Pawn. It is the bridge between the Human Player and the Character.
Each Human Player (in a multiplayer) has only one PlayerController. In singleplayer you also only have 1.

It is ALWAYS spawned. With a PlayerController, the whole Engine Framework wouldn’t work.

A Character/Pawn on the other Hand doesn’t need to exist. But if you have no Pawn/Character, you have nothing to possess
and control by the Controller.

Hi eXi,

Thanks for the info. I think as well that I am missing info and mixing things up thus the reason I was asking the question. I will read a bit more before I go further into my game just to make sure that I have everything setup properly.

Thanks again :wink:

thanks for the the info. as with eXi, this info will help me understand better the way it works. In “real life”, I work in QA so I think it’s just my QA side coming out and asking all of these question to make sure that I understand what is going on and if I don’t, so that people like you and the community here can put me back on the right track.

thanks a lot :wink:

Always glad to help. Please read the documentation about the GameFramework to better understand the classes:

And here are the overall Gameplay Docs (the one above is only the Framework Quickguide):

https://docs.unrealengine.com/latest/INT/Gameplay/index.html

Wow thank you, I will read them. Always on board when it’s time to learn something… properly :wink: loll