Newbie PlayerController class Implementation

Hi Everyone!!!

I’ve been trying to learn UE4 c++ by myself using the templates available with the UE4, but I’ve found that in the shooter game available in the marketplace, there’s a PlayerController class and a CameraManager class. As I’m new in this, I couldn’t find a way to implement those classes in a custom project, because there’s no example or tutorial about how to do it in the web. I would appreciate if anyone could enlighten me about how to implement this on a project, a little tutorial or an example I can look to find a way to use those classes in my project, I really want to learn the proper way to make a videogame with UE4. I’ll appreciate any help or tip anyone could give me.


In the editor, you can go to Edit->Add Code to Project, and create new classes extended from PlayerController and CameraManager. There’s an option to show all classes.

Then, in your code editor, you can open your GameMode class, and in the constructor, you can set the PlayerController class to use:

PlayerControllerClass = AYourPlayerController::StaticClass();

This will tell the game framework to use the specified playercontroller class.

You can set the CameraManager in your PlayerController’s construcctor:

PlayerCameraManagerClass = AYourCameraManager::StaticClass();

Hi staticvoidl, and thanks for your reply. The example you wrote is the farthest I’ve been with the PlayerController class, my problem its the implementation, the integration of those classes with my character, I don’t understand how the methods and the variables of those classes affect the inputs of my character, if somehow you could give me an example of the .h and .cpp using those 3 classes, it would be enough for me to get at least the primars of it. Thanks for your reply!!!

I’m not exactly sure what you’re looking for, but maybe it would be useful to have a read through the Game Framework page.
It would help if you could give a specific example of what you want to do.

I need an example of a project using those classes, it could be an easy one but implementing playerController, cameraManager and character classes so I can read them or see them to learn how to use them. I hope you can help me with this, I really need it.