Skip to content
Snippets Groups Projects
Commit 43771ae7 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

style(movement): removes some tabs and changes some linebreaks

parent edae026f
No related branches found
No related tags found
1 merge request!43refactor(movement): extracts turning logic from MovementCommponentBase to own Component
...@@ -24,7 +24,8 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent) ...@@ -24,7 +24,8 @@ void UTurnComponent::SetupPlayerInput(UInputComponent* PlayerInputComponent)
// we use the same IMC for movement and turning // we use the same IMC for movement and turning
// therefore if we move with the right hand, we turn with the left hand // therefore if we move with the right hand, we turn with the left hand
IMCTurn = IMCMovement_Right; IMCTurn = IMCMovement_Right;
} else }
else
{ {
RotationHand = VRPawn->RightHand; RotationHand = VRPawn->RightHand;
// we use the same IMC for movement and turning // we use the same IMC for movement and turning
...@@ -90,7 +91,8 @@ void UTurnComponent::OnBeginTurn(const FInputActionValue& Value) ...@@ -90,7 +91,8 @@ void UTurnComponent::OnBeginTurn(const FInputActionValue& Value)
if (UVirtualRealityUtilities::IsDesktopMode() && bApplyDesktopRotation) if (UVirtualRealityUtilities::IsDesktopMode() && bApplyDesktopRotation)
{ {
VRPawn->AddControllerYawInput(TurnRateFactor * TurnValue.X); VRPawn->AddControllerYawInput(TurnRateFactor * TurnValue.X);
} else }
else
{ {
RotateCameraAndPawn(TurnRateFactor * TurnValue.X); RotateCameraAndPawn(TurnRateFactor * TurnValue.X);
} }
......
...@@ -20,11 +20,9 @@ public: ...@@ -20,11 +20,9 @@ public:
virtual void SetupPlayerInput(UInputComponent* PlayerInputComponent) override; virtual void SetupPlayerInput(UInputComponent* PlayerInputComponent) override;
protected: protected:
UPROPERTY() UPROPERTY()
AVirtualRealityPawn* VRPawn; AVirtualRealityPawn* VRPawn;
UPROPERTY() UPROPERTY()
UEnhancedInputLocalPlayerSubsystem* InputSubsystem; UEnhancedInputLocalPlayerSubsystem* InputSubsystem;
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment