From d49c80e470cf3990b90201f233f52c59b517cad7 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Sat, 6 Jul 2024 16:34:04 +0200 Subject: [PATCH] take into account the device visual type when updating the hand visibility --- .../Private/SenseGlove/Components/SGVirtualHandComponent.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp index 99153184..f1d78b9b 100644 --- a/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp +++ b/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -612,7 +612,10 @@ void USGVirtualHandComponent::FImpl::UpdateVisibility() { FXRMotionControllerData MotionControllerData; const bool bGotMotionControllerData = Owner->GetMotionControllerData(MotionControllerData); - const bool bHandDataAvailable = bGotMotionControllerData && MotionControllerData.bValid; + const bool bHandDataAvailable = + bGotMotionControllerData + && MotionControllerData.bValid + && MotionControllerData.DeviceVisualType == EXRVisualType::Hand; const bool bIsHandVisible = Owner->GetVisibleFlag(); const bool bShouldBeVisibleWhenHandDataUnavailable = Owner->IsVisibleWhenHandDataUnavailable();