Skip to content

Commit 9c75443

Browse files
authored
Merge pull request #148 from De-Panther/hand_disabling_fix
Fixed issue with disabling hand when not tracking
2 parents 629abf1 + 0d432f9 commit 9c75443

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Packages/webxr/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- OnXRChange is called from the Update loop.
1212

1313
### Fixed
14-
- User scaling issue in FullView WebGLTemplates
14+
- User scaling issue in FullView WebGLTemplates.
15+
- Issue with disabling hand when not tracking.
1516

1617
## [0.9.0] - 2021-04-16
1718
### Added

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,16 @@ setTimeout(function () {
619619
}
620620
xrHand.enabled = 1;
621621
if (inputSource.hand.values) {
622-
frame.fillPoses(inputSource.hand.values(), refSpace, xrHand.poses);
622+
if (!frame.fillPoses(inputSource.hand.values(), refSpace, xrHand.poses)) {
623+
xrHand.enabled = 0;
624+
continue;
625+
}
623626
frame.fillJointRadii(inputSource.hand.values(), xrHand.radii);
624627
} else {
625-
frame.fillPoses(inputSource.hand, refSpace, xrHand.poses);
628+
if (!frame.fillPoses(inputSource.hand, refSpace, xrHand.poses)) {
629+
xrHand.enabled = 0;
630+
continue;
631+
}
626632
frame.fillJointRadii(inputSource.hand, xrHand.radii);
627633
}
628634
for (var j = 0; j < 25; j++) {

0 commit comments

Comments
 (0)