Jump to content
  • Advertisement
Sign in to follow this  
Yhonatan

Objects disappear after Z-120[solved]

This topic is 3645 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
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.

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
there was something that changed my Matrix later on.
Sorry for the trouble guys and thanks for the help!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!