spencer-melnick / Threshold

Untitled Unreal Engine project
Other
6 stars 2 forks source link

Move camera control from character to camera manager #12

Open spencer-melnick opened 4 years ago

spencer-melnick commented 4 years ago

Currently the camera is controlled via a spring arm and camera component attached directly to the character. I have heard it stated that using a separate camera component is generally frowned upon, and it's better to override CameraManager::GetCameraViewPoint() or Actor::GetActorEyesViewPoint, but I do not know the exact reason why - possibly to better allow direct control of other camera properties (e.g. FOV) that shouldn't be controlled at the character level, or to better decouple logic.

This will take a bit more research to determine the full justification for the switch and how to properly implement it.

Apparently Fortnite uses the PlayerCameraManager as the sole driver of camera location instead of the Character, and does not even have a SpringArmComponent. Generally speaking, it seems like it would be good to follow the practices from Fortnite since it is the flagship Unreal Engine project, but I'd still like to know more about why before committing fully to that method.