From 36bcb08c7585dfe5fa35fc612f867ff7accc774b Mon Sep 17 00:00:00 2001 From: Ji Yoon Rhee Date: Mon, 27 Nov 2023 19:22:22 -0500 Subject: [PATCH] in the middle of implementing the controller --- .../Intermediate/CachedAssetRegistry.bin | Bin 15139012 -> 15139012 bytes .../hwanyoung2/HYPlayerCharacController.h | 2 + .../Source/hwanyoung2/hwanyoung2Character.cpp | 167 ++++++++++++------ .../Source/hwanyoung2/hwanyoung2Character.h | 48 +++-- 4 files changed, 142 insertions(+), 75 deletions(-) diff --git a/hwanyoung2/Intermediate/CachedAssetRegistry.bin b/hwanyoung2/Intermediate/CachedAssetRegistry.bin index bd7eec5f9b7a0cc0a22e58125e1a56aaa47e59f8..fe9c3ae4f4c405cacca11ef7093589081d4e720b 100644 GIT binary patch delta 18481 zcmcJ0cR&Q!}>BnwI0AHh$5?wC;LnERnAKW_s9i@m;pK+y0T= z{d_IMTOFLR-szvBpZCn#Giz;H!e3!&#=oM|vi=;CmhqR#lp1yGBjM#KPRUmmpL}tD zR_ukqpPGLdvf%HZbN3(OpcNax*$D`KD=G z#?3~}UWgGI2p)pF&{S{}nhEWN09-?aIzpt-MlcCYgqDJz;7V7+*>$=U!CL6s3Q>Z$ z&{6Q?K@FJMrIEi71e-v?A8bFNoe%*}p@IQdgYbf&12Y1QE z2f`vmh!+BR)Ap>rM}q`}(NU-;yeNbTtpp#Tvk;77gdqfPp)Ptz5CZtOFS9wK?nOl4 zMZP`QBtE|fD|MndZ?F)0?+q5g*S*2kFfTut`wE^g4ih>F!F+Hp)_{e^!+8L5^P12Q z*HFPr`LDH59~o#T1XD^9tLM=W6a&&2B-G`3NvsR=dqappoPCh$H(}TvWN4{=AC~6T zR4^jk#xUswe<6Hd9~SyAT}cuRyhW1e#dt+e@fAh|y+u#{dT()wH_sX_Zg--OhKnIo zZ@4&*a$gd|`N+|t>xcaQY0;BWuhZfN$~B87dQd0^((*!aD}8iEbm!h@#LGh{tcjC5 z-`mD1Nk`+`IJppOwlx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Jv1Qi$ zmxZpKOyjC6M1Kt>OFvhb7Optl`ONdKj|>P1n?8inOI(fIkE`#inxL)8^$Oom;`-L$ zen|}OC3QKdFEcBBO5JFp!?iY0Xgt)UHpUj;IO6ZtXwY7)s96q|4|R3A7Gn#m6S4dX zmdhnFxiA=)crBOf17Ga}6?Og26^~7Q(W|HO(+@q2yy&*;NR+k$)Wc-H8YIsMxL7v= h(cfx#F#scpY)m`tyKQ?ELOCyzHGJ&2i*J4Ve*hR$JI??B diff --git a/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h b/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h index 2cdb059b..bd5fdc95 100644 --- a/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h +++ b/hwanyoung2/Source/hwanyoung2/HYPlayerCharacController.h @@ -2,6 +2,8 @@ #pragma once +#include "Interactable.h" + #include "CoreMinimal.h" #include "GameFramework/PlayerController.h" #include "HYPlayerCharacController.generated.h" diff --git a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp index e172502c..771f7976 100644 --- a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp +++ b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp @@ -4,6 +4,7 @@ #include "HYCharacAbilitySystemComponent.h" #include "HYPlayerCharacAttributeSet.h" #include "HYCharacGameplayAbility.h" +#include "HYPlayerCharacController.h" #include "Camera/CameraComponent.h" #include "Components/CapsuleComponent.h" #include "Components/InputComponent.h" @@ -12,6 +13,9 @@ #include "GameFramework/SpringArmComponent.h" #include "EnhancedInputComponent.h" #include "EnhancedInputSubsystems.h" +#include "Interactable.h" +#include "InventoryItem.h" + ////////////////////////////////////////////////////////////////////////// @@ -153,6 +157,52 @@ void Ahwanyoung2Character::BeginPlay() } } +void Ahwanyoung2Character::CheckForInteractables() +{ + // Creates a LineTrace (similar to RayCast) to check for a hit + FHitResult HitResult; + + // The range of area the system should check for interactables + int32 Range = 500; //this can be changed + + //The start of the trace is the transform of the follow camera + FVector StartTrace = FollowCamera->GetComponentLocation(); + + //And the end of the trace is the 500 units ahead of the start trace + FVector EndTrace = (FollowCamera->GetForwardVector() * Range) + StartTrace; + + //Keeps track of parameters passed into collision function, assuming that + //there are multiple collided actors that is passed through the collision function + FCollisionQueryParams QueryParams; + QueryParams.AddIgnoredActor(this); //we are ignoring this, which is the character + + //Similarly to how GetComponent<>() function works, we get the controller + //object attached to the character and cast it as player character controller class + AHYPlayerCharacController* IController = Cast(GetController()); + + if (IController) { + //Checking if something is hit by the line cast within the range + if (GetWorld()->LineTraceSingleByChannel(HitResult, StartTrace, EndTrace, + ECC_Visibility, QueryParams)) { + + //Cast the actor to AInteractable + AInteractable* Interactable = Cast(HitResult.GetActor()); + + if (Interactable) { + IController->CurrentInteractable = Interactable; + return; + } + } + + IController->CurrentInteractable = nullptr; + } +} + + +void Ahwanyoung2Character::Tick(float DeltaTime) +{ +} + ////////////////////////////////////////////////////////////////////////// // Input @@ -221,65 +271,65 @@ int32 Ahwanyoung2Character::GetAbilityLevel(EAbilityInputID AbilityID) const return int32(); } -void Ahwanyoung2Character::RemoveCharacterAbilities() -{ - //if the object doesn't have the authority, ability system component is not valid - //or character abilities are not given in the ability system component, - //we don't do anything and just return - if (GetLocalRole() != ROLE_Authority || - !AbilitySystemComponent.IsValid() || - !AbilitySystemComponent->CharacterAbilitiesGiven) - { - return; - } +//void Ahwanyoung2Character::RemoveCharacterAbilities() +//{ +// //if the object doesn't have the authority, ability system component is not valid +// //or character abilities are not given in the ability system component, +// //we don't do anything and just return +// if (GetLocalRole() != ROLE_Authority || +// !AbilitySystemComponent.IsValid() || +// !AbilitySystemComponent->CharacterAbilitiesGiven) +// { +// return; +// } +// +// TArray AbilitiesToRemove; +// for (const FGameplayAbilitySpec& Spec : AbilitySystemComponent->GetActivatableAbilities()) +// { +// if (Spec.SourceObject == this && CharacterAbilities.Contains(Spec.Ability->GetClass())) +// { +// AbilitiesToRemove.Add(Spec.Handle); //spec.handle is an instance of the ability +// } +// } +// +// for (int32 i = 0; i < AbilitiesToRemove.Num(); i++) +// { +// AbilitySystemComponent->ClearAbility(AbilitiesToRemove[i]); +// } +// +// AbilitySystemComponent->CharacterAbilitiesGiven = false; +//} - TArray AbilitiesToRemove; - for (const FGameplayAbilitySpec& Spec : AbilitySystemComponent->GetActivatableAbilities()) - { - if (Spec.SourceObject == this && CharacterAbilities.Contains(Spec.Ability->GetClass())) - { - AbilitiesToRemove.Add(Spec.Handle); //spec.handle is an instance of the ability - } - } - - for (int32 i = 0; i < AbilitiesToRemove.Num(); i++) - { - AbilitySystemComponent->ClearAbility(AbilitiesToRemove[i]); - } - - AbilitySystemComponent->CharacterAbilitiesGiven = false; -} - -void Ahwanyoung2Character::Die() -{ - RemoveCharacterAbilities(); - - GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision); - GetCharacterMovement()->GravityScale = 0; - GetCharacterMovement()->Velocity = FVector(0); //disabling character movement when death - - OnCharacterDied.Broadcast(this); - - if (AbilitySystemComponent.IsValid()) - { - AbilitySystemComponent->CancelAbilities(); - - FGameplayTagContainer EffectsTagsToRemove; - EffectsTagsToRemove.AddTag(EffectRemoveOnDeathTag); - int32 NumEffectsRemoved = AbilitySystemComponent->RemoveActiveEffectsWithTags(EffectsTagsToRemove); - AbilitySystemComponent->AddLooseGameplayTag(DeadTag); - } - - //playing death anim: - if (DeathMontage) - { - PlayAnimMontage(DeathMontage); - } - else - { - FinishDying(); - } -} +//void Ahwanyoung2Character::Die() +//{ +// RemoveCharacterAbilities(); +// +// GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision); +// GetCharacterMovement()->GravityScale = 0; +// GetCharacterMovement()->Velocity = FVector(0); //disabling character movement when death +// +// OnCharacterDied.Broadcast(this); +// +// if (AbilitySystemComponent.IsValid()) +// { +// AbilitySystemComponent->CancelAbilities(); +// +// FGameplayTagContainer EffectsTagsToRemove; +// EffectsTagsToRemove.AddTag(EffectRemoveOnDeathTag); +// int32 NumEffectsRemoved = AbilitySystemComponent->RemoveActiveEffectsWithTags(EffectsTagsToRemove); +// AbilitySystemComponent->AddLooseGameplayTag(DeadTag); +// } +// +// //playing death anim: +// if (DeathMontage) +// { +// PlayAnimMontage(DeathMontage); +// } +// else +// { +// FinishDying(); +// } +//} void Ahwanyoung2Character::FinishDying() { @@ -461,3 +511,4 @@ void Ahwanyoung2Character::SetGaugeP(float GaugeP) AttributeSetBase->SetGaugeP(GaugeP); } } + diff --git a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h index 36e43d09..ff8f01a0 100644 --- a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h +++ b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h @@ -27,7 +27,12 @@ class Ahwanyoung2Character : public ACharacter, public IAbilitySystemInterface /** Follow camera */ UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) class UCameraComponent* FollowCamera; - + + /** Collection sphere */ + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) + class USphereComponent* CollectionSphere; + +#pragma region Controller /** MappingContext */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) class UInputMappingContext* DefaultMappingContext; @@ -44,7 +49,9 @@ class Ahwanyoung2Character : public ACharacter, public IAbilitySystemInterface UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) class UInputAction* LookAction; +#pragma endregion move this to PlayerCharacController.h + public: UPROPERTY(BlueprintAssignable, Category = "Hwanyoung|Character") @@ -56,10 +63,10 @@ public: UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Character") virtual int32 GetAbilityLevel(EAbilityInputID AbilityID) const; - //this function is called only in the server: - virtual void RemoveCharacterAbilities(); - //this is also called only in the server: - virtual void Die(); + ////this function is called only in the server: + //virtual void RemoveCharacterAbilities(); + ////this is also called only in the server: + //virtual void Die(); UFUNCTION(BlueprintCallable, Category = "Hwanyoung|Character") virtual void FinishDying(); @@ -102,6 +109,13 @@ public: UFUNCTION(BlueprintCallable, Category = "HY_Character|Camera") FVector GetStartingCameraBoomLocation(); + /** Returns CameraBoom subobject **/ + class USpringArmComponent* GetCameraBoom() const { return CameraBoom; } + /** Returns FollowCamera subobject **/ + class UCameraComponent* GetFollowCamera() const { return FollowCamera; } + + virtual void Tick(float DeltaTime) override; + protected: //pointers to the attribute set and ability system component @@ -139,19 +153,19 @@ protected: FGameplayTag EffectRemoveOnDeathTag; UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Hwanyoung|Character") - FText CharacterName; + FText CharacterName; UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Hwanyoung|Animation") - UAnimMontage* DeathMontage; + UAnimMontage* DeathMontage; UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Hwanyoung|Abilties") - TSubclassOf DefaultAttributes; + TSubclassOf DefaultAttributes; UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Hwanyoung|Abilities") - TArray> StartupEffects; + TArray> StartupEffects; UPROPERTY(BlueprintReadOnly, EditAnywhere, Category = "Hwanyoung|Abilities") - TArray> CharacterAbilities; + TArray> CharacterAbilities; virtual void AddCharacterAbilities(); virtual void InitializeAttributes(); @@ -172,20 +186,20 @@ protected: /** Called for looking input */ void Look(const FInputActionValue& Value); - + + /** Called for checking for the closest Interactable in sight and in range*/ + void CheckForInteractables(); + protected: // APawn interface virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; - + // To add mapping context virtual void BeginPlay(); -public: - /** Returns CameraBoom subobject **/ - class USpringArmComponent* GetCameraBoom() const { return CameraBoom; } - /** Returns FollowCamera subobject **/ - class UCameraComponent* GetFollowCamera() const { return FollowCamera; } + // Checks for the closest Interactable in sight and in range + void CheckForInteractables(); };