In my Android application, I have a bunch of meshes in a collection that are moving around in 3D space. I want something to happen to the mesh when any one of the moving mesh (objects) are touched. How can I detect which object has been tapped / clicked?
Asked
Active
Viewed 6,884 times
2 Answers
5
In your View, you will need to override onTouchEvent() and determine if the touch event occurred on one of your objects. The Android Dev Blog has some examples on handling touch events.

Robby Pond
- 73,164
- 16
- 126
- 119
-
I know about onTtouchEvent. It only gives me x,y location where the touch was done. The question is how can I determine which of the moving mesh (if any) in 3d space was touched on? – ace Feb 14 '11 at 19:43
-
2You will need to manually figure out if the x,y is within the mesh. – Robby Pond Feb 14 '11 at 19:53
-
have you got any solutions @ace – Riddhi Shah Feb 22 '18 at 11:37