From cf9867818bf5bd558766350da4efb6714d2079fa Mon Sep 17 00:00:00 2001
From: Daniel Rupp <daniel.rupp@rwth-aachen.de>
Date: Wed, 3 Jul 2024 17:40:45 +0200
Subject: [PATCH] feature(scaling): cave actor should scale according to vr
 pawn

---
 .../Private/Pawn/Navigation/ScalingComponent.cpp       | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Source/RWTHVRToolkit/Private/Pawn/Navigation/ScalingComponent.cpp b/Source/RWTHVRToolkit/Private/Pawn/Navigation/ScalingComponent.cpp
index ddc0bb3..f08d8a0 100644
--- a/Source/RWTHVRToolkit/Private/Pawn/Navigation/ScalingComponent.cpp
+++ b/Source/RWTHVRToolkit/Private/Pawn/Navigation/ScalingComponent.cpp
@@ -87,8 +87,8 @@ void UScalingComponent::BeginPlay()
 	// in case of cave, also at this to the equal sized components
 	if(VRPawn->CaveSetupActor)
 	{
-		//UE_LOG(LogTemp,Display,TEXT("Cave Setup Actor is valid and will be added to equal Sized objects"))
-		//AddEqualSizedActor(VRPawn->CaveSetupActor);
+		UE_LOG(LogTemp,Display,TEXT("Cave Setup Actor is valid and will be added to equal Sized objects"))
+		AddEqualSizedActor(VRPawn->CaveSetupActor);
 	} else
 	{
 		UE_LOG(LogTemp,Display,TEXT("Cave Setup Actor is invalid in ScalingComponent::BeginPlay()"))
@@ -126,7 +126,7 @@ void UScalingComponent::OnGrow(const FInputActionValue& InputActionValue)
 	float PreviousScale = CurrentW2MScale; // store for computing scale ratio
 
 	CurrentW2MScale = CurrentW2MScale * (1 + ScaleStepSize);
-	GNearClippingPlane = CurrentW2MScale;
+	//GNearClippingPlane = CurrentW2MScale;
 	
 	FloatingPawnMovement->Acceleration = DefaultAcceleration * CurrentW2MScale/100;
 	FloatingPawnMovement->Deceleration = DefaultDeceleration* CurrentW2MScale/100;
@@ -156,7 +156,7 @@ void UScalingComponent::OnShrink(const FInputActionValue& InputActionValue)
 	float PreviousScale = CurrentW2MScale; // store for computing scale ratio
 	CurrentW2MScale = CurrentW2MScale / (1.f + ScaleStepSize);
 	
-	GNearClippingPlane = CurrentW2MScale;
+	//GNearClippingPlane = CurrentW2MScale;
 	FloatingPawnMovement->Acceleration = DefaultAcceleration * CurrentW2MScale/100;
 	FloatingPawnMovement->Deceleration = DefaultDeceleration * CurrentW2MScale/100;
 	FloatingPawnMovement->MaxSpeed = DefaultMaxSpeed * CurrentW2MScale/100;
@@ -187,7 +187,7 @@ void UScalingComponent::OnResetScale(const FInputActionValue& InputActionValue)
 	float CurrentW2MScale = UHeadMountedDisplayFunctionLibrary::GetWorldToMetersScale(GetOwner()->GetWorld());
 	float PreviousScale = CurrentW2MScale; // store for computing scale ratio
 	CurrentW2MScale = OriginalScale;
-	GNearClippingPlane = CurrentW2MScale;
+	//GNearClippingPlane = CurrentW2MScale;
 
 	FloatingPawnMovement->Acceleration = DefaultAcceleration * CurrentW2MScale/100;
 	FloatingPawnMovement->Deceleration = DefaultDeceleration * CurrentW2MScale/100;
-- 
GitLab