From 5f9d0b6145cdc7faf7e9f382c2f334e8df12f7eb Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Tue, 28 Jan 2025 12:46:35 +0100 Subject: [PATCH] fix a critical issue where HandStates->GetTransform(KeyPoint) was incorrectly resolving to (&HandStates[0])->GetTransform(KeyPoint), causing both hands to use the left hand's wrist transform under specific conditions --- Handbook/src/appendix/changelog.md | 6 ++++++ .../SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Handbook/src/appendix/changelog.md b/Handbook/src/appendix/changelog.md index 41438b47..e02cd1bd 100644 --- a/Handbook/src/appendix/changelog.md +++ b/Handbook/src/appendix/changelog.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fix a critical issue where `HandStates->GetTransform(KeyPoint)` was incorrectly resolving to `(&HandStates[0])->GetTransform(KeyPoint)`, causing both hands to use the left hand's wrist transform under specific conditions. This occurred when the `bFallbackToHandTrackingIfNoGloveDetected` option was enabled, two gloves were present, and no hardware wrist-tracking device was active, resulting in both hands overlapping at the same transform. + ## [2.3.1] - 2024-11-27 This patch release addresses a few issues with SenseGlove Sockets Editor. diff --git a/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp b/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp index 3c87c541..147e6451 100644 --- a/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp +++ b/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp @@ -2075,7 +2075,7 @@ bool FSGXRTracker::FImpl::UpdateXRHandTrackingData( XR_ENSURE(XRLocateHandJointsEXT(OutHandState.HandTracker, &LocateInfo, &OutHandState.Locations)); OutHandState.bTracked = OutHandState.Locations.isActive == XR_TRUE; - OutHandState.bHasReceivedJointPoses |= HandStates->bTracked; + OutHandState.bHasReceivedJointPoses |= OutHandState.bTracked; if (!OutHandState.bTracked) { return false; @@ -2209,7 +2209,7 @@ bool FSGXRTracker::FImpl::GetControllerTransform( } const EHandKeypoint KeyPoint = KeyPointInfoPtr->Key; - const FTransform& ControllerTransform{HandStates->GetTransform(KeyPoint)}; + const FTransform& ControllerTransform{HandState.GetTransform(KeyPoint)}; OutTransform = ControllerTransform; bOutMotionSourceHandTracking = true; bTracked = HandState.bTracked;