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:34:20 +01:00
parent c0ed6f0554
commit 685a4341c7
2 changed files with 8 additions and 2 deletions
@@ -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;