im using the gluperspective function and the objects i draw dont look realistic. im trying to make a simulator and a door thats suppose to be 7 feet high by 3 feet looks like a door thats 10 feet high and 1 foot wide.
gluperspective 54, width / height, .1, 15000
whats a more realistic set of perameters i can use
If you want to look through your monitor, like a virtual window into the world, some simple trig will get you an appropriate fov to use, given a typical eye distance from the screen.
Watch zNear and zFar, don’t hose your depth buffer. Try zNear = 1?
Originally posted by ninjarider: width and height is the pixel width and height of the screen.
Just make sure they are floating point values. I not, you will get an integer division, which means your aspect ration will not contain the fractional part of the division result.
as far as the number 45 in the gluperspective function. i have no clue what its suppose to mean or what it does
It is the Field of View of your view frustum in y direction. The vertical opening angle of your camera.