The boardgame player characters (“MainCharacterBP_BoardGame”) in my party game have a multitude of custom camera actors (“CharacterCamBP”) which I’ve added as child actor components, which allows me to have much better camera control, and also allows for easier camera transitions using Set View Target with Blend, however, here is the problem.
If the player wishes to change from an overhead camera (“OverheadCam”) to a traditional 3rd Person camera (“ThirdPersonCam”), where the player can use the mouse or right stick on a gamepad to move the camera around like a 3D Platformer, the “Add Controller Pitch Input” and “Add Controller Yaw Input” do not effect the current view target (A CharacterCamBP Child Actor Component called “ThirdPersonCam”).
Add Controller Yaw/Pitch/Roll Input only works when an active SpringArm+Camera is a direct component of MainCharacterBP_BoardGame, however due to a number of reasons, I want to get rid of the SpringArm+Camera components (I’ll explain one reason below).
I have tried going into the “CharacterCam” blueprint, and trying a variation of settings for “Use Pawn Control Rotation”, “Inherit Pitch” and “Inherit Yaw”.
I have also tried a bunch of crazy other things to no avail.
So I’m wondering, am I missing something incredibly obvious here? The only difference between the existing springarm and camera that I’m using, and the CharacterCam, is that the CharacterCam is a child actor component.
As for the reason why I am getting rid of the SpringArm+Camera components, it’s due to an issue that has plagued the game since the very beginning, and that is the camera manager automatically switching camera whenever a new player controller is created.
If there is a character with a Camera component anywhere in the level, and the CreatePlayer function is called, the camera automatically switches to the origin of player 0, or if there’s no player, it will go to the origin of the level.
I have disabled “AutoManageActiveCamera” in the player controller, and edited the PlayerController.cpp to change “AutoManageActiveCamera” default value from True to False.
I know that the work-around solution to this is to get a reference to actor who was the last view target, and set it as the view target immediately as a new player controller is created, but I like to understand where these problems occur and fix them, not work around them as it can get very messy.
Any thoughts on either of these problems?
Any help would be greatly appreciated.
Thank you all in advance.