Hints: Instead of gluProject, you likely need gluUnProject (going from the touch (x,y) coordinate on the screen to the (x,y,z) coordinate of your model-space).
To obtain the model-view matrix and the projection-view matrix needed for gluProject and gluUnProject, take a look at the API Demoes for the Kube in the SDK. Look at the classes MatrixGrabber.java and MatrixTrackingGL.java. However, i found gluUnProject to work incorrectly. I wrote my own version of gluUnProject and that one seems to work :-). Search this board for gluUnProject and you find my implementation of this method. On Jul 1, 8:04 am, alucard20004 <alucard20...@gmail.com> wrote: > Hi. > > My apology for my imperfect English. > > I'm new to OpenGL. > > Now I have 9 objects rotating / changing their color on the screen. > > Next, I'm trying to check if I touched them / which one of them just > got touched. Or if I touched the empty spaces between them. > > I've read the document about > > http://developer.android.com/reference/android/opengl/GLU.html#gluPro...[],%20int,%20float[],%20int,%20int[],%20int,%20float[],%20int%29 > > but still have no idea about the required parameters or how/where to > get them. > > I don't ask for the solution. But it'd be great if you can recommend > me if I'm taking the right direction? Or please guide me to good > places/resources where I can learn more about this. > > Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---