Download

Camera settings done in C++ base not reflected in Blueprint child

I have been using Tom Looman’s “Survival” as a guide. I have a C++ class “SCharacter” that is a parent of a Blueprint class.

I wanted to change the camera to act more like the Battery C++ tutorial.

It would not work until I created a new blueprint based on the class with the recent changes. Some things worked like the change of the TargetArmLength, but the “bUseControllerRotation…” values were not recognized. Because “some” changes worked, I assumed my problem with parts I am still getting a grasp on. After I could not remove anymore code and having put the exact code from the Battery example, I decided to use a new Blueprint class and it worked.

// Don’t rotate when the controller rotates. Let that just affect the camera.
bUseControllerRotationPitch = false;
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;

I still have both pawn’s camera acting different but supposedly using the same C++ class, well, they are because I now see that the pawn has it’s defaults different than what I wanted in the C++ class.

I am assuming that when I create the pawn, it’s settings are changed to match the parent class and just because I change it to another value in the parent class, the Blueprint won’t update changes.