Change `TargetArmLength` and `SocketOffset` in CameraBoomComponent on PlayerCharacter

This commit is contained in:
Louis Hobbs 2023-03-13 01:39:43 +00:00
parent 6d8dd33bda
commit ba6c614116
2 changed files with 5 additions and 5 deletions

View File

@ -30,16 +30,16 @@ APlayerCharacter::APlayerCharacter()
CameraBoom->SetupAttachment(RootComponent);
CameraBoom->bDoCollisionTest = true;
CameraBoom->bUsePawnControlRotation = true;
CameraBoom->TargetArmLength = 500.0f;
CameraBoom->TargetArmLength = 350.0f;
CameraBoom->bEnableCameraLag = true;
CameraBoom->CameraLagSpeed = 10.0f;
CameraBoom->SocketOffset = { 0.0f, 0.0f, 220.0f };
CameraBoom->SocketOffset = { 0.0f, 75.0f, 110.0f };
// Setup the camera component
CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
CameraComponent->SetupAttachment(CameraBoom, USpringArmComponent::SocketName);
CameraComponent->bUsePawnControlRotation = false;
CameraComponent->SetRelativeRotation({ -10.0f,0.0f,0.0f });
CameraComponent->SetRelativeRotation({ -5.0f,0.0f,0.0f });
// Setup the character movement
UCharacterMovementComponent* CharacterMovementComponent = GetCharacterMovement();

View File

@ -65,10 +65,10 @@ protected:
private:
UPROPERTY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true"))
USpringArmComponent* CameraBoom = nullptr;
UPROPERTY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true"))
UCameraComponent* CameraComponent = nullptr;
float DefaultMovementSpeed;