If you want to pick a rendered object, just check for collisions with a primitive bounding box and a casted ray.
1) Keep a copy of the matrix you use for the projection. 2) Implement this, using that matrix that you kept. For iPhone but easily portable to Android, so long as you know that you can't get the projection matrix normally. http://eigenclass.blogspot.com/2008/10/opengl-es-picking-using-ray-boundingbox.html On Sep 7, 10:11 am, Gameboy <r59...@gmail.com> wrote: > I'm trying to use gluUnProject for checking touch selection on a 3D > object, but seems I can not do with current 1.5 emulator. > > The method needs to know current viewport, model view matrix and > project matrix, I'm trying to use G11 gl to query but get nothing with > below codes: > > int[] viewport = new int[4] ; > gl.glGetIntegerv(GL11.GL_VIEWPORT, viewport, 0) ; > float[] modelview = new float[16] ; > gl.glGetFloatv(gl.GL_MODELVIEW_MATRIX, modelview, 0) ; > float[] project = new float[16] ; > gl.glGetFloatv(gl.GL_PROJECTION_MATRIX, project, 0) ; > > Questions: > 1) Is there other way to get these params? > 2) Does current 1.5 emulator support these G11 feature? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---