use engine api to set the tracking motion source

This commit is contained in:
Mamadou Babaei
2025-02-14 12:02:28 +01:00
parent c58473a7e7
commit 64f9d1597c
@@ -350,19 +350,12 @@ void USGWristTrackerComponent::FImpl::UpdateMotionSource() const
return;
}
UWorld* World{Owner->GetWorld()};
if (!World)
{
return;
}
if (World->IsGameWorld() && Owner->HasBeenInitialized())
{
Owner->MotionSource = Owner->IsRight()
const FName& TrackingMotionSource{
Owner->IsRight()
? Owner->GetWristTrackingSettings().RightHandMotionSource
: Owner->GetWristTrackingSettings().LeftHandMotionSource;
FMotionDelayService::RegisterDelayTarget(Owner, Owner->PlayerIndex, Owner->MotionSource);
}
: Owner->GetWristTrackingSettings().LeftHandMotionSource
};
Owner->SetTrackingMotionSource(TrackingMotionSource);
}
void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const