From 0bda89497d1ddfb656ad16d75510c66c737252d5 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Fri, 14 Jun 2024 05:49:19 +0200 Subject: [PATCH] check if motioncontrollerdata is valid --- .../Private/SenseGlove/Components/SGWristTrackerComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp index 4b30aeb8..763f9a72 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp @@ -230,7 +230,7 @@ void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const { FXRMotionControllerData MotionControllerData; const bool bGotMotionControllerData = Owner->GetMotionControllerData(MotionControllerData); - if (bGotMotionControllerData) + if (bGotMotionControllerData && MotionControllerData.bValid) { const bool bDeviceVisualTypeUpdated = Owner->DeviceVisualType != MotionControllerData.DeviceVisualType; if (bDeviceVisualTypeUpdated)