Android ARCore - how to render a UI element without ArSceneView

834 views Asked by At

I am a beginner in ARCore and I need to display an AR object than can be tapped and can respond with an action (e.g. displaying another activity).

I have tried to do it using examples such as this one - https://creativetech.blog/home/ui-elements-for-arcore-renderable which use sceneform to display UI elements. But sceneform has some disadvantages for my application, and also I do not need plane detection. My questions are:

  1. Can I display a 'tappable' object, a UI element such as button or a textview, but with GLSurfaceView instead of sceneform?

  2. If UI elements cannot bi displayed this way, is it possible to react to a tap on an object displayed on a GLSurfaceView?

1

There are 1 answers

0
Mick On

Sceneform ha now been 'open sourced and archived' - see the note at (https://developers.google.com/sceneform/develop).

The main example, at this time, for ARCore is OpenGL based and will allow you display an AR object as I think you want.

Have a look here for the overview: https://developers.google.com/ar/develop/java/quickstart

Some of the links to the code appear to be broken at the moment but is available here (look at the 'hello_ar-java' sample: https://github.com/google-ar/arcore-android-sdk/tree/master/samples