Skip to content

Commit e99bdc2

Browse files
alcooper91toji
authored andcommitted
Allow Anchor poses to be null
1 parent 0643f15 commit e99bdc2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hit-test-anchors.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@
217217
continue;
218218
}
219219
const anchorPose = frame.getPose(anchor.anchorSpace, xrRefSpace);
220-
anchoredObject.matrix = anchorPose.transform.matrix;
220+
if (anchorPose) {
221+
anchoredObject.matrix = anchorPose.transform.matrix;
222+
}
221223
}
222224

223225
scene.startFrame();
@@ -233,4 +235,4 @@
233235
initXR();
234236
</script>
235237
</body>
236-
</html>
238+
</html>

0 commit comments

Comments
 (0)