Code Framework
Last updated
Last updated
ComponentCameraSystem has a very clear and intelligible code framework. If you open up the source code folder, you can notice the whole codebase consists of four parts:
Components: contains individual component that alters camera position or rotation.
Core: contains fundamental actors/components that are used to compose components and manage cameras.
Extensions: contains individual extension that alters camera position or rotation after basic components are evaluated.
Utils: utilities that support blueprinting, debugging and particular components/extensions.
From a high-level view, each camera is a ECameraBase
class actor, and it contains a ECameraComponentFollow
class type object, a ECameraComponentAim
object and possible multiple ECameraExtensionBase
objects. Each component/extension has a UpdateComponent
method which is implemented to change camera properties such as position, rotation and FOV. For example, the TargetingAim
component enforces camera to always look at a given target actor in the level. All cameras are referred by the ECameraManager
actor responsible for transitioning to the next valid camera when current camera expires.
Feel free to examine the code and modify it to meet your needs.