explicitly assign motion controllers to the proper hands

This commit is contained in:
Mamadou Babaei
2023-03-28 10:39:13 +02:00
parent 73a01dfa0f
commit 584ce06822
@@ -90,6 +90,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
MotionControllerLeft->SetCanEverAffectNavigation(false);
MotionControllerLeft->SetWorldLocation(FVector{30.0f, -20.0f, -10.0f},
false, nullptr, ETeleportType::None);
MotionControllerLeft->SetTrackingSource(EControllerHand::Left);
HandLeft = ObjectInitializer.CreateDefaultSubobject<USGVirtualHandComponent>(this, TEXT("HandLeft"));
HandLeft->SetupAttachment(MotionControllerLeft);
@@ -103,6 +104,7 @@ ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer)
MotionControllerRight->SetCanEverAffectNavigation(false);
MotionControllerRight->SetWorldLocation(FVector{30.0f, 20.0f, -10.0f},
false, nullptr, ETeleportType::None);
MotionControllerRight->SetTrackingSource(EControllerHand::Left);
HandRight = ObjectInitializer.CreateDefaultSubobject<USGVirtualHandComponent>(this, TEXT("HandRight"));
HandRight->SetupAttachment(MotionControllerRight);