Sign in to follow this  

Objects disappear after Z-120[solved]

This topic is 3460 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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 );

Share this post


Link to post
Share on other sites

This topic is 3460 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this