From cfef8fa303b1b7421b5ad2bcb26f1d60e2a9be1c Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Thu, 20 Apr 2023 17:09:13 +0200 Subject: [PATCH] fix the wrong tracker origin calculations --- .../SenseGlove/Components/SGWristTrackerComponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp index 44d0c938..46f9827a 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp @@ -697,8 +697,8 @@ void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const { ensureAlwaysMsgf(Owner->Glove, TEXT("Invalid Glove!")); - FVector TrackerLocation{Owner->GetRelativeLocation()}; - FRotator TrackerRotation{Owner->GetRelativeRotation()}; + FVector TrackerLocation{Owner->GetComponentLocation()}; + FRotator TrackerRotation{Owner->GetComponentRotation()}; ESGPositionalTrackingHardware TrackerHardware = Owner->GetTrackingHardware(); if (TrackerHardware == ESGPositionalTrackingHardware::None) @@ -748,8 +748,8 @@ void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const void USGWristTrackerComponent::FImpl::DrawDebugGizmo() { const UWorld* World{Owner->GetWorld()}; - const FVector& Location{Owner->GetRelativeLocation()}; - const FRotator& Rotation{Owner->GetRelativeRotation()}; + const FVector& Location{Owner->GetComponentLocation()}; + const FRotator& Rotation{Owner->GetComponentRotation()}; const float Length = Owner->GetDebugWristTrackerGizmoLength(); const bool bPersistentLines = Owner->GetDebugWristTrackerGizmoPersistentLines(); const float LifeTime = UGameplayStatics::GetWorldDeltaSeconds(World)