Objects disappear after Z-120[solved]

Started by
5 comments, last by Yhonatan 15 years, 10 months ago
Hey all. There is something I have recently noticed - when an object is moving on the Z axis - after it reaches a certain number (I think it is -120) the object disappears. Is there any way to increase this number to -200 or to any other number? Thanks in advance [Edited by - Yhonatan on June 25, 2008 3:59:07 PM]
Advertisement
Although we could use more info, first thought is the far clipping plane. Try increasing the z_far distance. Found in the projection matrix.
Million-to-one chances occur nine times out of ten!
Quote:Original post by Mike nl
Although we could use more info, first thought is the far clipping plane. Try increasing the z_far distance. Found in the projection matrix.


Thanks, I think that's it, but can you please give me some more information on how doing this? I was searching the web and didnt find anything
i found out how!!!!!!1
thanks!
glOrtho(left, right, bottom, top, zNear, zFar)
glOrtho(left, right, bottom, top, 1.0, 1000.0)

or if you are using Perspective projection

void gluPerspective(fovy, aspect, zNear, zFar)
gluPerspective(fovy, aspect, 1.0, 1000.0)
Quote:Original post by MARS_999
glOrtho(left, right, bottom, top, zNear, zFar)
glOrtho(left, right, bottom, top, 1.0, 1000.0)

or if you are using Perspective projection

void gluPerspective(fovy, aspect, zNear, zFar)
gluPerspective(fovy, aspect, 1.0, 1000.0)


for some reason it didnt work

glMatrixMode( GL_PROJECTION );
glLoadIdentity( );
gluPerspective( 45.0, ratio, 0.1, 11450.0 );
there was something that changed my Matrix later on.
Sorry for the trouble guys and thanks for the help!

This topic is closed to new replies.

Advertisement