Change `TargetArmLength` and `SocketOffset` in CameraBoomComponent on PlayerCharacter
This commit is contained in:
parent
6d8dd33bda
commit
ba6c614116
|
@ -30,16 +30,16 @@ APlayerCharacter::APlayerCharacter()
|
||||||
CameraBoom->SetupAttachment(RootComponent);
|
CameraBoom->SetupAttachment(RootComponent);
|
||||||
CameraBoom->bDoCollisionTest = true;
|
CameraBoom->bDoCollisionTest = true;
|
||||||
CameraBoom->bUsePawnControlRotation = true;
|
CameraBoom->bUsePawnControlRotation = true;
|
||||||
CameraBoom->TargetArmLength = 500.0f;
|
CameraBoom->TargetArmLength = 350.0f;
|
||||||
CameraBoom->bEnableCameraLag = true;
|
CameraBoom->bEnableCameraLag = true;
|
||||||
CameraBoom->CameraLagSpeed = 10.0f;
|
CameraBoom->CameraLagSpeed = 10.0f;
|
||||||
CameraBoom->SocketOffset = { 0.0f, 0.0f, 220.0f };
|
CameraBoom->SocketOffset = { 0.0f, 75.0f, 110.0f };
|
||||||
|
|
||||||
// Setup the camera component
|
// Setup the camera component
|
||||||
CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
|
CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
|
||||||
CameraComponent->SetupAttachment(CameraBoom, USpringArmComponent::SocketName);
|
CameraComponent->SetupAttachment(CameraBoom, USpringArmComponent::SocketName);
|
||||||
CameraComponent->bUsePawnControlRotation = false;
|
CameraComponent->bUsePawnControlRotation = false;
|
||||||
CameraComponent->SetRelativeRotation({ -10.0f,0.0f,0.0f });
|
CameraComponent->SetRelativeRotation({ -5.0f,0.0f,0.0f });
|
||||||
|
|
||||||
// Setup the character movement
|
// Setup the character movement
|
||||||
UCharacterMovementComponent* CharacterMovementComponent = GetCharacterMovement();
|
UCharacterMovementComponent* CharacterMovementComponent = GetCharacterMovement();
|
||||||
|
|
|
@ -65,10 +65,10 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true"))
|
||||||
USpringArmComponent* CameraBoom = nullptr;
|
USpringArmComponent* CameraBoom = nullptr;
|
||||||
|
|
||||||
UPROPERTY()
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (AllowPrivateAccess = "true"))
|
||||||
UCameraComponent* CameraComponent = nullptr;
|
UCameraComponent* CameraComponent = nullptr;
|
||||||
|
|
||||||
float DefaultMovementSpeed;
|
float DefaultMovementSpeed;
|
||||||
|
|
Loading…
Reference in New Issue