fix the wrong hand offset calculations

This commit is contained in:
Mamadou Babaei
2023-04-28 01:20:51 +02:00
parent 5e84ad89c3
commit a2f0dccfb1
2 changed files with 4 additions and 4 deletions
@@ -126,12 +126,12 @@ void ASGPawn::BeginPlay()
WristTrackerLeft->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void WristTrackerLeft->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void
{ {
HandLeft->SetRelativeLocation(Location); HandLeft->SetWorldLocation(Location);
}); });
WristTrackerLeft->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void WristTrackerLeft->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void
{ {
HandLeft->SetRelativeRotation(Rotation); HandLeft->SetWorldRotation(Rotation);
}); });
WristTrackerRight->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void WristTrackerRight->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void
@@ -96,12 +96,12 @@ void ASGVirtualHandActor::BeginPlay()
WristTracker->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void WristTracker->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void
{ {
VirtualHand->SetRelativeLocation(Location); VirtualHand->SetWorldLocation(Location);
}); });
WristTracker->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void WristTracker->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void
{ {
VirtualHand->SetRelativeRotation(Rotation); VirtualHand->SetWorldRotation(Rotation);
}); });
} }