I’m starting a new project, and I would like to know, is there a specific reason to use each of these things? Would you ever create each of these things and have everything separated? Like I’m thinking for an RTS game, a Pawn would be used to control the Camera, a Player might be used for the little characters, and the Controller would be used to control everything, like all the Inputs? Or would it be better to just have all three of these mechanisms inside the Player Controller?
Am I over complicating things again?
PlayerController has been described as “the player’s will”. Its the first stop for inputs among many things.
Pawn and sub-classes like Character are controllable by the PlayerController through the Possess() command.
Cameras are usually a component of a Pawn. If you don’t do that there is global Camera that Unreal automatically assigns. Usually, you should give every Pawn a camera because different pawn types may have different settings.
You can sort of think of Character and Camera synonymously. Control flow will generally look something like:
Player Controller >> Controlled Pawn (which owns a Camera)
For an RTS with a typical top-down free camera, one way to implement is the PlayerController possesses a Character called “RTSCamera” which is invisible, but has collision, and owns a camera component.
1 Like