From ba6c6141167e9d7deaf38568cd8029c20b864098 Mon Sep 17 00:00:00 2001 From: Louis Hobbs Date: Mon, 13 Mar 2023 01:39:43 +0000 Subject: [PATCH] Change `TargetArmLength` and `SocketOffset` in CameraBoomComponent on PlayerCharacter --- Source/Nakatomi/PlayerCharacter.cpp | 6 +++--- Source/Nakatomi/PlayerCharacter.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index d19c05d..1bee0f3 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -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(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(); diff --git a/Source/Nakatomi/PlayerCharacter.h b/Source/Nakatomi/PlayerCharacter.h index 98aa33b..ad6c2cb 100644 --- a/Source/Nakatomi/PlayerCharacter.h +++ b/Source/Nakatomi/PlayerCharacter.h @@ -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;