fix the wrong tracker origin calculations

This commit is contained in:
Mamadou Babaei
2023-04-28 01:21:19 +02:00
parent e788117eaf
commit cfef8fa303
@@ -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)