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())) if (ABugMarkerActor *Marker = Cast<ABugMarkerActor>(TraceHit.GetActor()))
{ {
this->PlacementMarkerRoot->SetVisibility(true, false); this->PlacementMarkerRoot->SetVisibility(true, false);
this->ShowDummyMarker(false);
this->UpdateBugInformation(Marker->GetBugData()); this->UpdateBugInformation(Marker->GetBugData());
} }
else else
{ {
this->PlacementMarkerRoot->SetVisibility(true, true); this->PlacementMarkerRoot->SetVisibility(true, true);
this->ShowDummyMarker(true);
this->UpdateBugInformation(FJSONBugData()); this->UpdateBugInformation(FJSONBugData());
} }

View File

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