From c211e5d7e681a0495173ced34add7b92b3e392e6 Mon Sep 17 00:00:00 2001
From: Christian Helwig <helwig@vr.rwth-aachen.de>
Date: Mon, 23 Sep 2024 14:22:51 +0200
Subject: [PATCH] refactor(movement): renamed Turn variable in TurnComponent to
 XRTurn

---
 Config/DefaultRWTHVRToolkit.ini                               | 3 ++-
 .../RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp   | 4 ++--
 Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h   | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Config/DefaultRWTHVRToolkit.ini b/Config/DefaultRWTHVRToolkit.ini
index d56d665f..fa647a30 100644
--- a/Config/DefaultRWTHVRToolkit.ini
+++ b/Config/DefaultRWTHVRToolkit.ini
@@ -19,4 +19,5 @@
 +FunctionRedirects = (OldName="/Script/RWTHVRToolkit.DirectInteractionComponent.OnEndGrab",NewName="/Script/RWTHVRToolkit.DirectInteractionComponent.OnEndInteraction")
 +PropertyRedirects = (OldName="/Script/RWTHVRToolkit.DirectInteractionComponent.PreviousGrabBehavioursInRange",NewName="/Script/RWTHVRToolkit.DirectInteractionComponent.PreviousInteractableComponentsInRange")
 +PropertyRedirects = (OldName="/Script/RWTHVRToolkit.DirectInteractionComponent.CurrentGrabBehavioursInRange",NewName="/Script/RWTHVRToolkit.DirectInteractionComponent.CurrentInteractableComponentsInRange")
-+PropertyRedirects=(OldName="/Script/RWTHVRToolkit.TurnComponent.DesktopRotation",NewName="/Script/RWTHVRToolkit.TurnComponent.DesktopTurnCondition")
\ No newline at end of file
++PropertyRedirects=(OldName="/Script/RWTHVRToolkit.TurnComponent.DesktopRotation",NewName="/Script/RWTHVRToolkit.TurnComponent.DesktopTurnCondition")
++PropertyRedirects=(OldName="/Script/RWTHVRToolkit.TurnComponent.Turn",NewName="/Script/RWTHVRToolkit.TurnComponent.XRTurn")
\ No newline at end of file
diff --git a/Source/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp b/Source/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp
index 5a288723..7e3aee8e 100644
--- a/Source/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp
+++ b/Source/RWTHVRToolkit/Private/Pawn/Navigation/TurnComponent.cpp
@@ -42,7 +42,7 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
 			// no snap turning for desktop mode
 			if (!URWTHVRUtilities::IsDesktopMode())
 			{
-				EI->BindAction(Turn, ETriggerEvent::Started, this, &UTurnComponent::OnBeginSnapTurn);
+				EI->BindAction(XRTurn, ETriggerEvent::Started, this, &UTurnComponent::OnBeginSnapTurn);
 			}
 			else
 			{
@@ -53,7 +53,7 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
 		{
 			if (!URWTHVRUtilities::IsDesktopMode())
 			{
-				EI->BindAction(Turn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
+				EI->BindAction(XRTurn, ETriggerEvent::Triggered, this, &UTurnComponent::OnBeginTurn);
 			}
 			else
 			{
diff --git a/Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h b/Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h
index ca1f6eba..72cbaf55 100644
--- a/Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h
+++ b/Source/RWTHVRToolkit/Public/Pawn/Navigation/TurnComponent.h
@@ -35,7 +35,7 @@ public:
 	float SnapTurnAngle = 22.5;
 
 	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "VR Movement|Input|Actions")
-	class UInputAction* Turn;
+	class UInputAction* XRTurn;
 
 	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "VR Movement|Input|Actions")
 	class UInputAction* DesktopTurn;
-- 
GitLab