Skip to content

Commit b0138f0

Browse files
committed
PR fix
1 parent f147089 commit b0138f0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Packages/webxr/Runtime/Plugins/WebGL/webxr.jspre

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -586,16 +586,16 @@ setTimeout(function () {
586586
xrHand.jointIndex = j*16;
587587
xrHand.unityJointIndex = xrHand.bufferIndex + 5 + (j*8);
588588
if (!isNaN(xrHand.poses[xrHand.jointIndex])) {
589-
Module.HEAPF32[xrHand.unityJointIndex] = xrHand.poses[xrHand.jointIndex+12]; // XRJointData.position.x
590-
Module.HEAPF32[xrHand.unityJointIndex + 1] = xrHand.poses[xrHand.jointIndex+13]; // XRJointData.position.y
591-
Module.HEAPF32[xrHand.unityJointIndex + 2] = -xrHand.poses[xrHand.jointIndex+14]; // XRJointData.position.z
589+
Module.HEAPF32[xrHand.unityJointIndex++] = xrHand.poses[xrHand.jointIndex+12]; // XRJointData.position.x
590+
Module.HEAPF32[xrHand.unityJointIndex++] = xrHand.poses[xrHand.jointIndex+13]; // XRJointData.position.y
591+
Module.HEAPF32[xrHand.unityJointIndex++] = -xrHand.poses[xrHand.jointIndex+14]; // XRJointData.position.z
592592
this.quaternionFromMatrix(xrHand.jointIndex, xrHand.poses, xrHand.jointQuaternion);
593-
Module.HEAPF32[xrHand.unityJointIndex + 3] = -xrHand.jointQuaternion[0]; // XRJointData.rotation.x
594-
Module.HEAPF32[xrHand.unityJointIndex + 4] = -xrHand.jointQuaternion[1]; // XRJointData.rotation.y
595-
Module.HEAPF32[xrHand.unityJointIndex + 5] = xrHand.jointQuaternion[2]; // XRJointData.rotation.z
596-
Module.HEAPF32[xrHand.unityJointIndex + 6] = xrHand.jointQuaternion[3]; // XRJointData.rotation.w
593+
Module.HEAPF32[xrHand.unityJointIndex++] = -xrHand.jointQuaternion[0]; // XRJointData.rotation.x
594+
Module.HEAPF32[xrHand.unityJointIndex++] = -xrHand.jointQuaternion[1]; // XRJointData.rotation.y
595+
Module.HEAPF32[xrHand.unityJointIndex++] = xrHand.jointQuaternion[2]; // XRJointData.rotation.z
596+
Module.HEAPF32[xrHand.unityJointIndex++] = xrHand.jointQuaternion[3]; // XRJointData.rotation.w
597597
if (!isNaN(xrHand.radii[j])) {
598-
Module.HEAPF32[xrHand.unityJointIndex + 7] = xrHand.radii[j]; // XRJointData.radius
598+
Module.HEAPF32[xrHand.unityJointIndex] = xrHand.radii[j]; // XRJointData.radius
599599
}
600600
}
601601
}

0 commit comments

Comments
 (0)