Skip to content

Instantly share code, notes, and snippets.

@burakiren
Created November 24, 2020 12:13
Show Gist options
  • Save burakiren/cfb18877045ded0fece0a1cdd12f6490 to your computer and use it in GitHub Desktop.
Save burakiren/cfb18877045ded0fece0a1cdd12f6490 to your computer and use it in GitHub Desktop.
Hit Test
//Pass the click event to the ARFrame object and generate the hit detection result.
List<ARHitResult> hitResults = arFrame.hitTest(motionEvent);
//Create an anchor at the detected hit location to enable the AR Engine to continuously track the location.
for (ARHitResult arHitResult : hitResults) {
arHitResult.createAnchor();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment