Hey,
I’m doing the FPS Tutorial
I was about to implement the AFPSCharacter Constructer to initialize a new Camera Component.
AFPSCharacter::AFPSCharacter(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
// Create a CameraComponent
FirstPersonCameraComponent = ObjectInitializer.CreateDefaultSubobject<UCameraComponent>(this, TEXT("FirstPersonCamera"));
FirstPersonCameraComponent->AttachToComponent(GetCapsuleComponent, FAttachmentTransformRules::KeepWorldTransform);
FirstPersonCameraComponent->RelativeLocation = FVector(0, 0, 50.0f + BaseEyeHeight);
FirstPersonCameraComponent->bUsePawnControlRotation = true;
}
When I compile and play I can’t move the camera up and down, only left and right.
I also tried it with FAttachmentTransformRules::KeepRelativTransform and even the depracted AttachTo doesnt work.