Hi!
I’ve been doing unreal’s tutorial to create a camera from a pawn in C++:
https://docs.unrealengine.com/latest/INT/Programming/Tutorials/PlayerCamera/1/
The thing is, when I get to step 3 where I am asked to add this to the constructor:
RootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent"));
OurCameraSpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraSpringArm"));
OurCameraSpringArm->SetupAttachment(RootComponent);
OurCameraSpringArm->SetRelativeLocationAndRotation(FVector(0.0f, 0.0f, 50.0f), FRotator(-60.0f, 0.0f, 0.0f));
OurCameraSpringArm->TargetArmLength = 400.f;
OurCameraSpringArm->bEnableCameraLag = true;
OurCameraSpringArm->CameraLagSpeed = 3.0f;
The third line ( OurCameraSpringArm->SetupAttachment(RootComponent); )
gives me an error saying that a USpringArmComponent does not have a member called SetupAttachment.
So here is my question : Guessing Epic hasn’t updated this tutorial, what is the “new” way to attach the SpringArm to the SceneComponent?