   Opengl es 2d picking
  On android, I am converting screen coords into world coords. I have used a couple of different methods (manual calculation, glUnProject()), and get the same results, so I am fairly confident in the calculation. Plus, I have retrieved the modelview and projection matrices in a couple of different ways, so I believe I have the correct values there, as well.What I don't understand is, when I click in the center of the screen:screen: x[160.0] y[272.0]world: x[-4.000047] y[4.999204]And, when I click around the boundaries of the screen, I get:screen: x[2.6666667] y[2.6666667]world: x[-4.0245013] y[5.041014]screen: x[317.33334] y[532.0]world: x[-3.9755936] y[4.958793]My questions are:1. Is this a likely outcome?2. Why is the change in world coordinate so slight?3. How would I determine if the world coordinate intersects a polygon? I've seen plane intersection techniques, but not polygon intersection techniques. Plus, the plane I would like to test for intersection is in the middle of the screen, with a height and width of 1. This does not put it anywhere near the world coords calculated.   
1. Is this a likely outcome?2. Why is the change in world coordinate so slight?[/quote]Impossible to say without knowing the specifics of your coordinate system. Your screen could be 1000 units across, or it could just as well be 0.001 units across, it all depends on how you setup your view/projection matrices.;  I figured it out, partly.I was not resetting the projection and modelview matrices to identity before retrieving them.Now, when I touch the center of the screen, I get x=0, y=0.The only issue, now, is that after the first world coord calculation, everything comes close up. I am translating the scene 10 or 20 units into the z-axis. After the first world coord calculation, the scene appears to be stuck 1 unit into the z-axis.   ;  Well, couldn't you convert the polygons' world coordinates to screen coordinates and simply do a point-in-polygon check instead?For some reason, I always do the picking stuff (at least in editor-like programs) in screen space.   ;  Yeah, most of the examples I've found do it from screen to world coords. I don't see any reason you couldn't do it the other way around. I am mostly having trouble understanding the cause and effect of certain settings of the projection and modelview matrices.What I have come up with now, is to use an orthographic projection matrix, and to reset the modelview matrix before attempting to calculate the world coordinates. At least this is giving me an x, y value world coordinate that logically resembles the projection I configured when the screen is created.The success I had in my previous reply was due to the fact that I was resetting the model and all, but I was also setting the projection matrix to identity, which was giving me a unit square coordinate system (-1,-1 -> 1, 1), and I was getting touch coordinates to match. But, of course, my sprites were outside of these coordinates. I thought translating them further into the scene would fix this, but they are still in the same coordinate system even though they are further away? It was confusing because I was translating one sprite to 3, -6; but when I clicked there, I was getting a world coords between -1 and 1.I'm going to go with the orthographic projection for now, as I am working in 2D. The thing now is that my textures are all stretched.   