I’m attempting to make a floor for my world, and as the floor (simply a square face) gets further away, one would assume that the sides would draw closer to each other. However, the face simply flattens out. How do I get it to accurately reflect depth? Pictures included in case I’m not making myself clear…
pict1 - overhead view pict2 - camera raised up and moved back
Use gluPerspective( view_angle, hight/width ratio, near, far )
Note near/far must be positive, near > 0.
This will project depth, example even though the object is square, closer side will be larger then far side of square…
Originally posted by Dogcow:
[b]I’m attempting to make a floor for my world, and as the floor (simply a square face) gets further away, one would assume that the sides would draw closer to each other. However, the face simply flattens out. How do I get it to accurately reflect depth? Pictures included in case I’m not making myself clear…
pict1 - overhead view pict2 - camera raised up and moved back
The values depends on the scale of your scene. But you can always start with some absurd values, like set near to 0.0001 and far to 1000000. It will kill the depth buffer for sure, but you can change the values to fogure out what’s best for you.