I’m trying to make my 2d puzzel 3d.
At the moment I’m using this camera setup:
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
gluPerspective(60., 1920 / float(1080), 900., 1000.)
glMatrixMode(GL_MODELVIEW)
gluLookAt(960,540, math.sqrt(3)*540, 960,540,0,0,1,0)
It works but I get a view as if I’m looking down on the middle of the puzzle. (When a piece is in the lower left corner I see the top and right sides of it and when it’s in the top left I see the lower and left side of it)
pic: http://pix.sonhult.se/puzzle.jpg
What I want is to have the camera as if I was standing infront (below) the screen.
I’ve drawn a picture of it:
http://pix.sonhult.se/camera2.jpg
And it’s important that the x, y plane in z = 0 is linear since that’s where I detect hits and stuff…
It should be fairly easy to setup I think but I can’t seem to do it