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 commit is contained in:
Mamadou Babaei
2025-01-28 14:18:48 +01:00
parent 0291155631
commit 6444336269
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### 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.
- Additional minor fixes and improvements that may not be listed here.
### Changed
@@ -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;