I've got that collision detection system implemented, yet. And I'm
agree to use glUnproject as the best achoice. My problem is that I
remap the modelview matrix with the sensors and when I rotate the
phone, change the coords of the screen returned by glUnproject. Even
if I keep the object in the same place of the screen. Furthermore, I
don't understand why it doesn't return values according to the given
viewport. Because of all this I was looking for alternatives, but if
you explain me what's the matter with glUnproject, I'll be really
pleasent.

Thanks you very much for this answer and (I hope) for the next one.

On 10 mayo, 19:11, Robert Green <[email protected]> wrote:
> What are you trying to do?
>
> glReadPixels is a pipeline stall - it will slow everything down.  If
> you want to check to see if an object has been touched, use a
> collision detection system, unproject the touch point into a ray and
> get the closest item that intersects with that ray.  It's actually
> easier, more reliable and faster.
>
> On May 10, 10:16 am, Alfonso <[email protected]> wrote:
>
> > glReadPixels is too slow, so I need another way. Without testing
> > object by object, Is there any other way?
>
> > Thanks you very much
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group 
> > athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to