From 9199db00dfb93f222e35e372811d7033783c043d Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Fri, 28 Apr 2023 01:40:49 +0100 Subject: [PATCH] Bugfix Merchant Unable to Interact --- Content/Assets/Characters/Merchant/AMerchant.uasset | 4 ++-- Content/Dialogue/SM_Merchant_Blueprint.uasset | 4 ++-- Content/Levels/Build.umap | 2 +- Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp | 3 +-- Source/the_twilight_abyss/PlayerTemp/TempCharacter.h | 2 +- .../the_twilight_abyss/TurnBasedCombatV2/HoldToInitCombat.cpp | 3 ++- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Content/Assets/Characters/Merchant/AMerchant.uasset b/Content/Assets/Characters/Merchant/AMerchant.uasset index 7727174..f30aa5c 100644 --- a/Content/Assets/Characters/Merchant/AMerchant.uasset +++ b/Content/Assets/Characters/Merchant/AMerchant.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f393154a0f896dc3f18db5f2fde98c24c0e09b0a5af2353c0791a3dc68ddfaa6 -size 31228 +oid sha256:9568956c515b0dd6cfaa5d3b9066c4e1ae3dae77f22ba6380927ebe578c25864 +size 31289 diff --git a/Content/Dialogue/SM_Merchant_Blueprint.uasset b/Content/Dialogue/SM_Merchant_Blueprint.uasset index fbc69fd..5e49cb8 100644 --- a/Content/Dialogue/SM_Merchant_Blueprint.uasset +++ b/Content/Dialogue/SM_Merchant_Blueprint.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1a05a77e83cdcc946788f34d06958a1c8ee5bdc010408ce4302fb57ba3d72dd -size 74738 +oid sha256:357690e27378e48b1eecef73e5e39063d46e2cfe2d48a53f78279395226c81be +size 74555 diff --git a/Content/Levels/Build.umap b/Content/Levels/Build.umap index fd16943..4744982 100644 --- a/Content/Levels/Build.umap +++ b/Content/Levels/Build.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dd3e648b3c9ff971d456dbac8784db4eec0dad5f5b31ba1965c74c5c690e839 +oid sha256:0887359e764f20de0bf8af88c023d2baac3815d639626d0b3105b2760f91dd69 size 3493015 diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp index f45d69a..afabe2f 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.cpp @@ -143,10 +143,9 @@ void ATempCharacter::LineTraceLogic() FVector Start = ThisCamera->GetComponentLocation(); FVector End = Start + GlobalTrace * ThisCamera->GetForwardVector(); FCollisionQueryParams TraceParams; - TraceParams.AddIgnoredActor(this); - bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams); + bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Pawn, TraceParams); if (bHit) { //we store the GetItem function from InventoryComponent into ItemArray variable diff --git a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h index 3463954..f710c17 100644 --- a/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h +++ b/Source/the_twilight_abyss/PlayerTemp/TempCharacter.h @@ -53,7 +53,7 @@ public: void KeyPressed(); UPROPERTY(EditAnyWhere) - float TraceDistance = 500; + float TraceDistance = 200; void InputDisabler(); void LineTraceLogic(); diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/HoldToInitCombat.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/HoldToInitCombat.cpp index be87747..520affc 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/HoldToInitCombat.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/HoldToInitCombat.cpp @@ -7,6 +7,7 @@ #include "TurnBaseCombatV2.h" #include "BehaviorTree/BlackboardComponent.h" #include "Blueprint/UserWidget.h" +#include "Camera/CameraComponent.h" #include "Kismet/GameplayStatics.h" #include "Misc/OutputDeviceNull.h" @@ -101,7 +102,7 @@ void UHoldToInitCombat::OnClickDown() AActor* UHoldToInitCombat::LookingAtEnemy() const { - FVector Start = GetOwner()->GetActorLocation(); + FVector Start = Cast(GetOwner()->FindComponentByClass())->GetComponentLocation(); FVector End = GetOwner()->GetActorForwardVector() * 1000.0f + Start; FCollisionQueryParams CollisionParams; CollisionParams.AddIgnoredActor(GetOwner());