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 Start = ThisCamera->GetComponentLocation();
|
||||||
FVector End = Start + GlobalTrace * ThisCamera->GetForwardVector();
|
FVector End = Start + GlobalTrace * ThisCamera->GetForwardVector();
|
||||||
FCollisionQueryParams TraceParams;
|
FCollisionQueryParams TraceParams;
|
||||||
|
|
||||||
TraceParams.AddIgnoredActor(this);
|
TraceParams.AddIgnoredActor(this);
|
||||||
|
|
||||||
bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams);
|
bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Pawn, TraceParams);
|
||||||
if (bHit)
|
if (bHit)
|
||||||
{
|
{
|
||||||
//we store the GetItem function from InventoryComponent into ItemArray variable
|
//we store the GetItem function from InventoryComponent into ItemArray variable
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
void KeyPressed();
|
void KeyPressed();
|
||||||
|
|
||||||
UPROPERTY(EditAnyWhere)
|
UPROPERTY(EditAnyWhere)
|
||||||
float TraceDistance = 500;
|
float TraceDistance = 200;
|
||||||
|
|
||||||
void InputDisabler();
|
void InputDisabler();
|
||||||
void LineTraceLogic();
|
void LineTraceLogic();
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "TurnBaseCombatV2.h"
|
#include "TurnBaseCombatV2.h"
|
||||||
#include "BehaviorTree/BlackboardComponent.h"
|
#include "BehaviorTree/BlackboardComponent.h"
|
||||||
#include "Blueprint/UserWidget.h"
|
#include "Blueprint/UserWidget.h"
|
||||||
|
#include "Camera/CameraComponent.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "Misc/OutputDeviceNull.h"
|
#include "Misc/OutputDeviceNull.h"
|
||||||
|
|
||||||
@ -101,7 +102,7 @@ void UHoldToInitCombat::OnClickDown()
|
|||||||
|
|
||||||
AActor* UHoldToInitCombat::LookingAtEnemy() const
|
AActor* UHoldToInitCombat::LookingAtEnemy() const
|
||||||
{
|
{
|
||||||
FVector Start = GetOwner()->GetActorLocation();
|
FVector Start = Cast<UCameraComponent>(GetOwner()->FindComponentByClass<UCameraComponent>())->GetComponentLocation();
|
||||||
FVector End = GetOwner()->GetActorForwardVector() * 1000.0f + Start;
|
FVector End = GetOwner()->GetActorForwardVector() * 1000.0f + Start;
|
||||||
FCollisionQueryParams CollisionParams;
|
FCollisionQueryParams CollisionParams;
|
||||||
CollisionParams.AddIgnoredActor(GetOwner());
|
CollisionParams.AddIgnoredActor(GetOwner());
|
||||||
|
Loading…
Reference in New Issue
Block a user