Beginner Question - PlayerController

I’m browsing the UT code too, and what I see is that the bindings for the input is set in the PlayerController, and the PlayerController calls the movement methods on the Character(which is a property on PlayerController). So in the Character there are no input bindings.

In the Shooter example(and the FPS template) the bindings are setup in the Character.

What are the advantages/disadvanteges of both constructions?

I’ve recently switched my input handling to a PlayerController because my blueprint inheriting from a custom pawn stole the input. So this doesn’t answer your question specifically but it may be worth mentioning that there is an input precedence that isn’t entirely obvious at first.

I also think that Epic adds to misunderstandings if they handle input in Character or Pawn instead of a PlayerController. I guess this is down to the flexibility of UE4 which allows such things, but really created more confusion than benefit for me personally. I’d rather have been forced to handle input in PlayerController to begin with.

Looking at the latest UT code is good practice to see how they’re handling stuff there. They do handle input in PlayerController but also have an additional MovementInput Class which may be worth an explanation, if anyone can.

I’m just getting started with UE4.5 and over the last week I’ve come to this realization. It seems like ideally you want to use a player controller to keep track of anything you don’t want destroyed with your pawn (lives, score, etc). I really wish Epic would provide simple examples using PlayerControllers, HUDs, and GameModes to ease entry a bit. I kind of feel like some of what I’ve learned from the examples is bad habit.

As a transitioning Unity person The mix of terms used is a bit confusing. Pawn vs Character controller? I completed a 2 part tut online done by Tesla (very well done), wherein he guided the viewer to create a simple FPS Player input (https://www.youtube.com/watch?v=VMD-z2Xni8U) this provides simple but workable controls.

My question is, defining a Game mode and creating a Player Blueprint necessary for each new project if I require FPS controls? I imagine this could be exported and reimported into a new Project/level combination. And the Player Start component that is created in the default empty level is simply the starting place for one’s FPS or 3rd person controller? It doesn’t hold any actual movement code?

In Unity, First or Third person controls are simply components that can be imported into a new project/scene. Is this not the case with UE4? In a new project, in a empty, default level, what do I require to have FPS style movement that would fall off the edge of the floor if I step that far?

Working my way through the lessons, but this is quite unclear. Thanks.
B.

I think lives and scores should rather be defined in PlayerState though. Global scores maybe in GameState. Anything statey in either of those two.

Zak Parrish explains “Pawn vs Player Controller” in the first 2 minutes of this video (Even though the tutorial series is for a Third Person game, I think you would benefit from watching this fairly short series and applying the principles to your FPS.): https://www.youtube.com/watch?v=_Y8ZOLGZQRM&index=70&list=PLZlv_N0_O1gaCL2XjKluO7N2Pmmw9pvhE

Hint if you can’t find the PlayerController class in the asset browser (as I couldn’t at first sight): In the content pane of the Content Browser click “View Options” (bottom right) → “Show Engine Content” and try again… PlayerController can be found under “Engine C++ Classes” → Engine → Classes → GameFramwork.

Actually Zak only explains the difference between “Pawn vs. Character”. A Character BP is a type of Pawn that includes a lot of built-in movement functions. I’m still trying to find a straight answer on “(Pawn or Character) vs. Player Controller”