diff --git a/Content/BP_VirtualRealityPawn.uasset b/Content/BP_VirtualRealityPawn.uasset index 2870c55ca9d0135f07db10a523b0f6c111a92caa..669a33b467ef612a92e0ac5d2d4e3e4281b9d768 100644 Binary files a/Content/BP_VirtualRealityPawn.uasset and b/Content/BP_VirtualRealityPawn.uasset differ diff --git a/Content/Components/Movement/IMC_MovementLeftHand.uasset b/Content/Components/Movement/IMC_MovementLeftHand.uasset index c7fdfb5d7ddc7e25c09a22c3fadd1583281d3093..1b819c8b2270edb366d3e4a7a3d5bad08d442d55 100644 Binary files a/Content/Components/Movement/IMC_MovementLeftHand.uasset and b/Content/Components/Movement/IMC_MovementLeftHand.uasset differ diff --git a/Content/Input/IMC_RWTH_Base.uasset b/Content/Input/IMC_RWTH_Base.uasset index a90cfadd2015ff2b735923826aa5e42a353003fa..5e80ec59f93b3b2edcc10c4bf2b20e676e62f02a 100644 Binary files a/Content/Input/IMC_RWTH_Base.uasset and b/Content/Input/IMC_RWTH_Base.uasset differ diff --git a/Content/TestMap.umap b/Content/TestMap.umap index 491c1042ae6531228fdc0c2600a0d562404368b0..5fad234120caa5ab3e0db6b674d7f88123f69aef 100644 Binary files a/Content/TestMap.umap and b/Content/TestMap.umap differ diff --git a/Source/RWTHVRToolkit/Private/Pawn/ContinuousMovementComponent.cpp b/Source/RWTHVRToolkit/Private/Pawn/ContinuousMovementComponent.cpp index aeb39ad7b42bb7f6691e95b1f2c24e2c8b9abd48..9177fb244f9751ae3d8f44cccb94f44116ebf706 100644 --- a/Source/RWTHVRToolkit/Private/Pawn/ContinuousMovementComponent.cpp +++ b/Source/RWTHVRToolkit/Private/Pawn/ContinuousMovementComponent.cpp @@ -41,9 +41,6 @@ void UContinuousMovementComponent::SetupInputActions() UE_LOG(LogTemp,Error,TEXT("InputSubsystem IS NOT VALID")); return; } - - InputSubsystem->ClearAllMappings(); - // add Input Mapping context InputSubsystem->AddMappingContext(IMCMovement,0); @@ -72,19 +69,19 @@ void UContinuousMovementComponent::SetupInputActions() APlayerController* PC = Cast<APlayerController>(VRPawn->GetController()); if (PC) { - UE_LOG(LogTemp,Error,TEXT("PC PLAYER CONtroller is valid")); PC->bShowMouseCursor = true; PC->bEnableClickEvents = true; PC->bEnableMouseOverEvents = true; + } else + { + UE_LOG(LogTemp,Error,TEXT("PC Player Controller is invalid")); } EI->BindAction(InputActions->DesktopRotation, ETriggerEvent::Started, this, &UContinuousMovementComponent::StartDesktopRotation); EI->BindAction(InputActions->DesktopRotation, ETriggerEvent::Completed, this, &UContinuousMovementComponent::EndDesktopRotation); - EI->BindAction(InputActions->MoveUp, ETriggerEvent::Triggered,this,&UContinuousMovementComponent::OnBeginUp); } } - void UContinuousMovementComponent::StartDesktopRotation() { bApplyDesktopRotation = true; @@ -141,7 +138,7 @@ void UContinuousMovementComponent::OnBeginTurn(const FInputActionValue& Value) { if (UVirtualRealityUtilities::IsDesktopMode() && bApplyDesktopRotation) { - VRPawn->AddControllerPitchInput(TurnRateFactor * TurnValue.Y); + VRPawn->AddControllerPitchInput(TurnRateFactor * -TurnValue.Y); SetCameraOffset(); } } @@ -151,7 +148,6 @@ void UContinuousMovementComponent::OnBeginTurn(const FInputActionValue& Value) void UContinuousMovementComponent::OnBeginSnapTurn(const FInputActionValue& Value) { const FVector2D TurnValue = Value.Get<FVector2D>(); - if (TurnValue.X != 0.f) { VRPawn->AddControllerYawInput(SnapTurnAngle); @@ -183,8 +179,6 @@ void UContinuousMovementComponent::UpdateRightHandForDesktopInteraction() void UContinuousMovementComponent::OnBeginUp(const FInputActionValue& Value) { const float MoveValue = Value.Get<FVector2D>().X; - UE_LOG(LogTemp,Warning,TEXT("MoveUp: %f"),MoveValue); //the right hand is rotated on desktop to follow the cursor so it's forward is also changing with cursor position VRPawn->AddMovementInput(VRPawn->Head->GetUpVector(), MoveValue); - } diff --git a/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp b/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp index ee80d768485e5d326bcb7fe06efa1da878db2d54..c94916dc6f86a82b590616337ecd20bd0d52c970 100644 --- a/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp +++ b/Source/RWTHVRToolkit/Private/Pawn/VirtualRealityPawn.cpp @@ -6,7 +6,6 @@ #include "Engine/LocalPlayer.h" #include "GameFramework/PlayerController.h" #include "Pawn/UniversalTrackedComponent.h" -#include "Utility/VirtualRealityUtilities.h" #include "EnhancedInputComponent.h" #include "EnhancedInputSubsystems.h" #include "Camera/CameraComponent.h" diff --git a/Source/RWTHVRToolkit/Public/Pawn/ContinuousMovementComponent.h b/Source/RWTHVRToolkit/Public/Pawn/ContinuousMovementComponent.h index 0b068288c1d6429c75b879979850c536bcae844d..ba5919079c334eb9101b20c2c2f97aab598ea1cd 100644 --- a/Source/RWTHVRToolkit/Public/Pawn/ContinuousMovementComponent.h +++ b/Source/RWTHVRToolkit/Public/Pawn/ContinuousMovementComponent.h @@ -78,7 +78,6 @@ public: private: - UPROPERTY() UUniversalTrackedComponent* MovementHand; diff --git a/Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h b/Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h index a2bfbf6c8d62dca6816368ce3518d8e3f92f7e27..aff028d969a87c23db8bbfc032e5687e64184378 100644 --- a/Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h +++ b/Source/RWTHVRToolkit/Public/Pawn/VirtualRealityPawn.h @@ -10,6 +10,13 @@ class UCameraComponent; class ULiveLinkComponentController; + + +/** + * Custom logging for all RWTHToolkit related stuff + */ + + /** * */