Bug placement marker now disappears when hovering over an existing bug to improve visibility.

This commit is contained in:
Jamie Greunbaum 2023-03-27 02:56:55 -04:00
parent e6beab5822
commit 3e9688e055
3 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@ -94,11 +94,13 @@ void ABugPlacerPawn::TraceTimerElapsed()
if (ABugMarkerActor *Marker = Cast<ABugMarkerActor>(TraceHit.GetActor()))
{
this->PlacementMarkerRoot->SetVisibility(true, false);
this->ShowDummyMarker(false);
this->UpdateBugInformation(Marker->GetBugData());
}
else
{
this->PlacementMarkerRoot->SetVisibility(true, true);
this->ShowDummyMarker(true);
this->UpdateBugInformation(FJSONBugData());
}

View File

@ -28,6 +28,8 @@ public:
UFUNCTION(BlueprintImplementableEvent)
void UpdateBugInformation(const FJSONBugData &BugData);
UFUNCTION(BlueprintImplementableEvent)
void ShowDummyMarker(const bool bShow);
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject"))
static void SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubclassOf<ABugPlacerPawn> Class);