diff --git a/Content/UI/UMG_BugPlacementOverlay.uasset b/Content/UI/UMG_BugPlacementOverlay.uasset index b69b2fc..08344b9 100644 Binary files a/Content/UI/UMG_BugPlacementOverlay.uasset and b/Content/UI/UMG_BugPlacementOverlay.uasset differ diff --git a/Source/Unrealzilla/Private/BugPlacerPawn.cpp b/Source/Unrealzilla/Private/BugPlacerPawn.cpp index 8e912d7..e2c43f4 100644 --- a/Source/Unrealzilla/Private/BugPlacerPawn.cpp +++ b/Source/Unrealzilla/Private/BugPlacerPawn.cpp @@ -94,17 +94,18 @@ void ABugPlacerPawn::TraceTimerElapsed() if (ABugMarkerActor *Marker = Cast(TraceHit.GetActor())) { this->PlacementMarkerRoot->SetVisibility(true, false); - this->ShowDummyMarker(false); this->UpdateBugInformation(Marker->GetBugData()); + this->ShowDummyMarker(false); } else { this->PlacementMarkerRoot->SetVisibility(true, true); - this->ShowDummyMarker(true); this->UpdateBugInformation(FJSONBugData()); + this->ShowDummyMarker(true); } this->PlacementMarkerRoot->SetWorldLocationAndRotation(TraceHit.ImpactPoint, FRotationMatrix::MakeFromZ(TraceHit.ImpactNormal).ToQuat()); + this->ShowCrosshairs(false); const FVector TraceOriginLocation = this->TraceOriginComponent->GetComponentLocation(); FVector FacingVector = (TraceHit.ImpactPoint - TraceOriginLocation); @@ -118,6 +119,7 @@ void ABugPlacerPawn::TraceTimerElapsed() { this->PlacementMarkerRoot->SetRelativeLocationAndRotation(FVector::ZeroVector, FRotator::ZeroRotator); this->PlacementMarkerRoot->SetVisibility(false, true); + this->ShowCrosshairs(true); const FVector TraceOriginLocation = this->TraceOriginComponent->GetComponentLocation(); FVector FacingVector = (TraceEnd - TraceOriginLocation); diff --git a/Source/Unrealzilla/Public/BugPlacerPawn.h b/Source/Unrealzilla/Public/BugPlacerPawn.h index fd47e47..0e5ca21 100644 --- a/Source/Unrealzilla/Public/BugPlacerPawn.h +++ b/Source/Unrealzilla/Public/BugPlacerPawn.h @@ -30,6 +30,8 @@ public: void UpdateBugInformation(const FJSONBugData &BugData); UFUNCTION(BlueprintImplementableEvent) void ShowDummyMarker(const bool bShow); + UFUNCTION(BlueprintImplementableEvent) + void ShowCrosshairs(const bool bShow); UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject")) static void SpawnBugPlacerPawn(const UObject *WorldContextObject, TSubclassOf Class);