Original Post
Im trying to make a 2D scrolling shooter game but i want to be able to use the z axis so i can have a 3D background. This is using glulootat i position the camera at 0 0 2 looking at 0, 0, 0 and i get this picture but the problem is i want to be sat directly at 0, 0, 0 looking down the z axis. I tried doing GluLookat(0,0,0,0,0,0,0,1,0) but nothing displays. I settup perspective using, aspect=(float)width/(float)height; gluPerspective(60, aspect, 1, 5000);
The 2 lines circled are coming from -1 in the z to +1 as you can see they dont look right. They should appear as a straight line like in the glortho image below this is so i can have enemies coming from the far distance that fly over the player. Gluortho this is what i want it to look like but if i do it using gluortho the appearance of 3d goes out the window. glOrtho(-1, 1, -1, 1, -1, 1);
Im not sure how to keep everything mapped to the image window ive made everything within the range -1 to 1 but how do i make it so that the top right of the image window is 1,1 and the bottom left is -1 -1. thx alot for any advice
The 2 lines circled are coming from -1 in the z to +1 as you can see they dont look right. They should appear as a straight line like in the glortho image below this is so i can have enemies coming from the far distance that fly over the player. Gluortho this is what i want it to look like but if i do it using gluortho the appearance of 3d goes out the window. glOrtho(-1, 1, -1, 1, -1, 1);
Im not sure how to keep everything mapped to the image window ive made everything within the range -1 to 1 but how do i make it so that the top right of the image window is 1,1 and the bottom left is -1 -1. thx alot for any advice