What class is responsible for the initialization of the PlayerController?
Here is what is bothering me. I really like modularity. As far as I understand in Unreal we achieve modularity by "attaching" Actor Components to Actors. So far so good. There is one thing bothering me with the template projects. For example the Third Person Shooter C++ template. In in we have a player character class derived from ACharacter. If my project name is "MyProject", this class will be called MyProjectCharacter. In this character we have pointers to UCameraComponent and USpringArmCompoment. I assume that this is done for simplification, but I consider this not to be a good practice. I want loose coupling. In other words I think it'd be better to separate the Camera Logic in a different actor. For example CameraRig class and the MyProjectCharacter wouldn't even know of the existence of a Camera. What I'd do is create a PlayerController class that is the link between the CameraRig and MyProjectCharacter. It turns out that Unreal Engine has a class PlayerController. I noticed that we can implement our versions of the PlayerController and swap the in the GameMode. So far so good. I also noticed that the PlayerController is an Actor that is spawned when I click play. So my questions are:
I have noticed that some very serious demo projects like the ShooterGame from the Market Store follow similar guidelines, but the template projects do not.
asked Mar 08 '17 at 12:41 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here