Virtual Button In Artoolkit
I want to develop an Android application to detect some target and show play icon over it. When user click the play icon, augmented reality played on another activity. I use ARTool
Solution 1:
The play button you want to place is a 3D object inside a GLSurfaceView, there is no "View" associated to that object, so you can't just use an OnClickListener.
ARToolkit gives you the marker coordinates on 3DSpace, but that I don't think that coordinates are what you are asking for.
As I see it, you have 2 main options:
- You made a play button that appears in the screen (not overlaid on the marker) and then you use it as a normal View. You can link the visibility to the object to the event of the marker being found or not.
- You process the touch event on the GLSurfaceView doing raycasting and checking if it hits the object that is the play button.
Option 1 is the simplest, option 2 is what you describe.
Post a Comment for "Virtual Button In Artoolkit"