Updated TempCharacter

Made the linetrace boolean a global in the headerfile for potential future enemy detection
This commit is contained in:
MH261677 2022-11-23 00:55:55 +00:00
parent 168a43d751
commit 783e13075c
2 changed files with 4 additions and 1 deletions

View File

@ -74,7 +74,7 @@ void ATempCharacter::LineTraceLogic()
TraceParams.AddIgnoredActor(this);
bool bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams);
bHit = GetWorld()->LineTraceSingleByChannel(OutHit, Start, End, ECC_Visibility, TraceParams);
if (bHit)
{
if(OutHit.GetActor() == nullptr)

View File

@ -47,6 +47,9 @@ public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= "Gold")
int GoldBalance;
UPROPERTY(VisibleDefaultsOnly, Category = "LineTrace")
bool bHit;
//Using the item in the inventory
UFUNCTION(BlueprintCallable, Category= "Items")
void UseItem(class UBaseItem* Item); // Overriding the BaseItem Class