-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Description: The scene ar-hit-test
component keeps a Map anchorToObject3D
corresponding to previous hit-test result .
Every ar-hit-test
tick, the HitTest.updateAnchorPoses
function is called to try to update the pose of aforementioned object3D from the list of XRFrame.trackedAnchors
. However, if a tracked anchor is not mapped from a hit-test result, such as an anchor created by the user from some other means, Map lookup will fail and object3DOptions
will be undefined.
aframe/src/components/scene/ar-hit-test.js
Lines 197 to 202 in a3f6d12
if (anchorPose) { | |
object3DOptions = HitTest.prototype.anchorToObject3D.get(anchor); | |
offset = object3DOptions.offset; | |
object3D = object3DOptions.object3D; | |
applyPose(anchorPose, object3D, offset); |
Could be addressed just by adding a check for object3DOptions
before attempting to access its properties and apply the pose
- A-Frame Version:
1.4.21.5.0 - Platform / Device: Any device supporting immersive-ar persistent
anchors
andhit-test
- Reproducible Code Snippet or URL:
Metadata
Metadata
Assignees
Labels
No labels