From d9edb8d6c1e0d03029b01fa9d54acba37ce679a6 Mon Sep 17 00:00:00 2001 From: Sebastian Pape <Sebastian.Pape@rwth-aachen.de> Date: Tue, 30 Jul 2019 15:13:34 +0200 Subject: [PATCH] Altering the debug output --- Source/CAVEOverlay/Private/CAVEOverlayController.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/CAVEOverlay/Private/CAVEOverlayController.cpp b/Source/CAVEOverlay/Private/CAVEOverlayController.cpp index 3e5ab12..79d45af 100644 --- a/Source/CAVEOverlay/Private/CAVEOverlayController.cpp +++ b/Source/CAVEOverlay/Private/CAVEOverlayController.cpp @@ -207,11 +207,12 @@ void ACAVEOverlayController::Tick(float DeltaTime) tape_root->SetRelativeLocation(shutter_position * FVector(0, 0, 1)); //Only apply Z float tape_opacity = calculateOpacityFromPosition(shutter_position); - tape_material_dynamic_->SetScalarParameterValue("BarrierOpacity", tape_opacity); - UE_LOG(CAVEOverlayLog, Log, TEXT("Flystick %p, pos (%f,%f,%f), opacity %f"), shutter_glasses_, shutter_position.X, shutter_position.Y, shutter_position.Z, tape_opacity); + UE_LOG(CAVEOverlayLog, Log, TEXT("Glasses %p, pos (%f,%f,%f), opacity %f"), shutter_glasses_, shutter_position.X, shutter_position.Y, shutter_position.Z, tape_opacity); UE_LOG(CAVEOverlayLog, Log, TEXT("TapeMaterial %p"), tape_material_dynamic_); + tape_material_dynamic_->SetScalarParameterValue("BarrierOpacity", tape_opacity); + if (FMath::IsWithin(FVector2D(shutter_position).GetAbsMax(), wall_distance_ - wall_warning_distance_, wall_distance_)) { //in warning distance == red tape tape_material_dynamic_->SetVectorParameterValue("StripeColor", FVector(1, 0, 0)); } -- GitLab