How to detect a click on an object in OpenGL ES in an Android application?

In my Android app, I have a bunch of meshes in a collection that move in three-dimensional space. I want something to happen to the grid when any moving grid (objects) is affected. How to determine which object was pressed / pressed?

+6
android opengl-es
source share
2 answers

In your view, you need to override onTouchEvent () and determine if a touch event has occurred on one of your objects. Android Dev Blog has examples of using touch events.

+4
source share

Choice of onions .

+3
source share

All Articles