Fixed the issue. able to launch the editor again.
Time to be sad, and drunk, or high.
This commit is contained in:
@@ -23,9 +23,11 @@ void AAuraPlayerController::CursorTrace()
|
||||
FHitResult CursorHit;
|
||||
GetHitResultUnderCursor(ECC_Visibility, false, CursorHit);
|
||||
if (!CursorHit.bBlockingHit) return;
|
||||
AActor* HitActor = CursorHit.GetActor();
|
||||
IEnemyInterface* Enemy = Cast<IEnemyInterface>(HitActor);
|
||||
|
||||
LastActor = ThisActor;
|
||||
ThisActor = CursorHit.GetActor();
|
||||
ThisActor = Enemy;
|
||||
|
||||
/**
|
||||
*Line trace from curso. There are several scenarios
|
||||
@@ -47,7 +49,7 @@ void AAuraPlayerController::CursorTrace()
|
||||
if (ThisActor != nullptr)
|
||||
{
|
||||
//Case B
|
||||
ThisActor->HighlightActor();
|
||||
//ThisActor->HighlightActor();
|
||||
//UE_LOG(LogTemp, Warning, TEXT("Case B"));
|
||||
}
|
||||
}
|
||||
@@ -55,14 +57,14 @@ void AAuraPlayerController::CursorTrace()
|
||||
{
|
||||
if (ThisActor == nullptr)
|
||||
{
|
||||
LastActor->UnHighlightActor();
|
||||
//LastActor->UnHighlightActor();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LastActor != ThisActor) // Case D
|
||||
{
|
||||
LastActor->UnHighlightActor();
|
||||
ThisActor->HighlightActor();
|
||||
//LastActor->UnHighlightActor();
|
||||
//ThisActor->HighlightActor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +72,18 @@ void AAuraPlayerController::CursorTrace()
|
||||
|
||||
}
|
||||
|
||||
/* //cheated and skipped ahead to try and fix error :(
|
||||
void AAuraPlayerController::HightlightActor(AActor* Actor)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void AAuraPlayerController::UnHightlightActor(AActor* Actor)
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
void AAuraPlayerController::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
@@ -18,12 +18,12 @@ class UEnemyInterface : public UInterface
|
||||
*/
|
||||
class AURA_API IEnemyInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
GENERATED_BODY()
|
||||
|
||||
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
|
||||
public:
|
||||
|
||||
virtual void HighlightActor();
|
||||
virtual void HighlightActor() = 0;
|
||||
virtual void UnHighlightActor() = 0;
|
||||
|
||||
};
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "Interact/EnemyInterface.h"
|
||||
#include "AuraPlayerController.generated.h"
|
||||
|
||||
|
||||
class UInputMappingContext;
|
||||
class UInputAction;
|
||||
struct FInputActionValue;
|
||||
@@ -40,4 +39,13 @@ private:
|
||||
void CursorTrace();
|
||||
IEnemyInterface* LastActor;
|
||||
IEnemyInterface* ThisActor;
|
||||
|
||||
/*
|
||||
TObjectPtr<AActor> LastActor;
|
||||
TObjectPtr<AActor> ThisActor;
|
||||
|
||||
FHitResult CursorHit;
|
||||
static void HightlightActor(AActor* Actor);
|
||||
static void UnHightlightActor(AActor* Actor);
|
||||
*/
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user