My situation is this. I'm looking down at a board with pieces on it. I want to place the next piece by using the touch input. I get the x, y coordinated from the touch input and I have my screen width and height.
I use a standard declaration for my perspective:
- Code: Select all
float ratio = (float) width / height;
GLU.gluPerspective(gl, 45.0f, ratio, 1, 100f);
If it helps assume we are using a MotoDroid resolution [480 x 854]
Before drawing anything I pull my camera back by 30.0f
- Code: Select all
gl.glTranslatef(0, 0, -30.0f);
Are there other numbers I need to make the calculation?
So, if I click 0,0 on my screen and my gameboard is 30f deep into the screen how do I get the x,y on my board?
Thanks so much

