Android how to get opengl 3D coordinates in ontouch event

Posted by Sandy on Game Development See other posts from Game Development or by Sandy
Published on 2012-02-22T08:17:01Z Indexed on 2012/04/13 17:43 UTC
Read the original article Hit count: 276

Filed under:
|

I created a cube in opengl and it rotates in ontouch event. To to this I created a CustomSurfaceView as follows

public class CustomSurfaceView extends GLSurfaceView {
    @Override
    public boolean onTouchEvent(MotionEvent e) {
        float x = e.getX()
        float y = e.getY();
    }
}

Here x and y are screen coordinates. How can I get 3D coordinated from this? I have already looked gluProject and NeHe. But I dont know how to implement this in my project, it shows that there is no GLdouble,GLfloat class.

© Game Development or respective owner

Related posts about android

Related posts about opengl-es