To have the camera following the character, you need to make sure the character is using the controller rotation; this is set by doing the follow (inside the character constructor in the .cpp file):
bUseControllerRotationPitch = false; // 'true' will set the character's Pitch to rotate based on input; 'false' will turn off character Pitch rotation via input.
bUseControllerRotationYaw = true; // 'true' will set the character's Yaw to rotate based on input; 'false' will turn off character Yaw rotation via input.
bUseControllerRotationRoll = false; // 'true' will set the character's Roll to rotate based on input; 'false' will turn off character Roll rotation via input.
You will want to use the Controller’s Yaw for the character rotating left/right. You will likely want to have Pitch set to ‘false’ as it would lean your character forward/backward via input if set to ‘true’; Roll will lean the character left/right.
NOTE: For a fresh Third Person Template project, the above should set the camera to be following the character’s movement. If it does not for your project, make sure to do everything below as well.
You need to make sure the Camera Boom’s rotation inheritance is set to true for each axis you wish to have following the parent component. You can do this inside the character constructor in the .cpp file (make sure it is AFTER the CameraBoom has been created and attached):
CameraBoom->bInheritPitch = true; // This inherits the pitch rotation from the parent of the camera boom.
CameraBoom->bInheritYaw = true; // This inherits the yaw rotation from the parent of the camera boom.
CameraBoom->bInheritRoll = true; // This inherits the roll rotation from the parent of the camera boom.
Also, make sure the Camera Boom is using the Controller View Rotation -
CameraBoom->bUseControllerViewRotation = true; // 'true' locks the Camera Boom rotation to follow controller input.
and that absolute rotation is not turned on -
CameraBoom->bAbsoluteRotation = false; // 'true' will set the Camera Boom to rotate independently from its parent (this also means inheritance will not be applied, even if set to 'true').
There is a bit more to change in terms of creating a free-look camera (quite a bit if you do it properly) while moving around but if you are still interested in how to do that, I can write a guide on it.