From a43ec2c068d91ee36b941308aa9e9caee044b7ec Mon Sep 17 00:00:00 2001 From: baz Date: Sat, 9 Mar 2024 03:51:34 +0000 Subject: [PATCH] Add getter for player CameraComponent --- Source/Nakatomi/PlayerCharacter.cpp | 5 +++++ Source/Nakatomi/PlayerCharacter.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index 5f8d084..174cf53 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -826,3 +826,8 @@ void APlayerCharacter::SetIsThrowing(bool bIsThrowing) { IsThrowing = bIsThrowing; } + +UCameraComponent* APlayerCharacter::GetCameraComponent() +{ + return CameraComponent; +} diff --git a/Source/Nakatomi/PlayerCharacter.h b/Source/Nakatomi/PlayerCharacter.h index f291d00..40d26ea 100644 --- a/Source/Nakatomi/PlayerCharacter.h +++ b/Source/Nakatomi/PlayerCharacter.h @@ -242,6 +242,8 @@ public: UFUNCTION(BlueprintCallable) void SetIsThrowing(bool bIsThrowing); + UCameraComponent* GetCameraComponent(); + protected: virtual void CalculateHits(TArray* hits, FVector* dir) override;