Last active
August 8, 2019 14:47
-
-
Save andijakl/8c09b1cea515f183c0dc6bf6bd1976c1 to your computer and use it in GitHub Desktop.
Call-back from the hit test: register an AR anchor at this position through Amazon Sumerian's ArSystem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hit test callback. If the hit test was successful (i.e., detected a | |
// point in the real world), registers an anchor with that point. | |
hitTestCallback(anchorTransform) { | |
if (anchorTransform) { | |
console.log("Transform from hit test: " + anchorTransform + ". Registering anchor..."); | |
this.arSystem.registerAnchor(anchorTransform, (anchorId) => this.registerAnchorCallback(anchorId)); | |
} else { | |
console.log("No transform received from hit test"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment