Bugfix Merchant Unable to Interact
This commit is contained in:
parent
bc171eba80
commit
9199db00df
BIN
Content/Assets/Characters/Merchant/AMerchant.uasset
(Stored with Git LFS)
BIN
Content/Assets/Characters/Merchant/AMerchant.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Dialogue/SM_Merchant_Blueprint.uasset
(Stored with Git LFS)
BIN
Content/Dialogue/SM_Merchant_Blueprint.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -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
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
void KeyPressed();
|
||||
|
||||
UPROPERTY(EditAnyWhere)
|
||||
float TraceDistance = 500;
|
||||
float TraceDistance = 200;
|
||||
|
||||
void InputDisabler();
|
||||
void LineTraceLogic();
|
||||
|
@ -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<UCameraComponent>(GetOwner()->FindComponentByClass<UCameraComponent>())->GetComponentLocation();
|
||||
FVector End = GetOwner()->GetActorForwardVector() * 1000.0f + Start;
|
||||
FCollisionQueryParams CollisionParams;
|
||||
CollisionParams.AddIgnoredActor(GetOwner());
|
||||
|
Loading…
Reference in New Issue
Block a user