Ive recently updated from 4.14 to 4.17.
The CameraBoom exists in the editor, but its “details” tab is blank.
This is how the CameraBoom is setup in the constructor for my pawn:
// Create a camera boom... CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CharacterCameraBoom")); CameraBoom->SetupAttachment(RootComponent); CameraBoom->bAbsoluteRotation = true; // Don't want arm to rotate when character does CameraBoom->TargetArmLength = 20000.f; CameraBoom->RelativeRotation = FRotator(-60.f, 0.f, 0.f); CameraBoom->bDoCollisionTest = false; // Don't want to pull camera in when it collides with level
At no point do I ever manually destroy the CameraBoom, but I do detach it using DetachFromComponent().
In my pawn’s Tick(), CameraBoom is Null for some reason.
The player’s view ends up stuck at 0,0,0 and obviously can’t control it(since CameraBoom doesn’t exist).
This setup worked before the update to 4.17.
Did I setup the constructor wrong?
Does DetachFromComponent() destroy the component it detaches?
Did something change in Components between 4.14 and 4.17 that might be causing this?
I got it working after changing:
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CharacterCameraBoom"));
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
This naming difference didn’t cause a problem in older versions, and its not that big a deal for me to change, but is there a particular reason why it would prevent the proper setting of CameraBoom?