Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


gluLookAt problems


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Magallo   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 April 2000 - 08:54 PM

Hello world, this site is great, Nehe rules!!! Now the problems..... I draw a cube into the DrawGLScene like this glClear(GL_COLOR_BUFFER_BIT / GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glTranslatef(0.0f,0.0f,-5.0f); glRotatef(yrot,0.0f,1.0f,0.0f); //draw the cube ....... ....... and all is ok. Now I want to implement camera movements trought the gluLookAt function like this glClear(GL_COLOR_BUFFER_BIT / GL_DEPTH_BUFFER_BIT); glLoadIdentity(); gluLookAt(eye.x, eye.y, eye.z, 0.0f, 0.0f, 100.0f, 0.0f, 1.0f, 0.0f); glTranslatef(0.0f,0.0f,-5.0f); glRotatef(yrot,0.0f,1.0f,0.0f); //draw the cube ....... ....... Where eye.x,eye.y,eye.z are initialized at 0.0f But I can''t see the cube...... why ? I mean, it is exaclty 5 units BEHIND and not IN FRONT of me! If use change the instruction glTranslatef(0.0f,0.0f,-5.0f); with glTranslatef(0.0f,0.0f,5.0f); now I am able to see it. WHY ?!?!??! Please, somebody help me Thanks in advance Magallo tripuno@tiscalinet.it

Sponsor:

#2 ga   Members   -  Reputation: 126

Like
Likes
Like

Posted 21 April 2000 - 03:03 AM

Without using gluLookAt() you look in the direction of the negative Z axis. With your gluLookAt() call you look in the direction of the positive Z axis.

Visit our homepage: www.rarebyte.de.st

GA

#3 sc0rpy   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 April 2000 - 05:37 PM

I posted a similar question to yours about 7 days ago:

http://www.gamedev.net/community/forums/topic.asp?topic_id=11720&forum_id=27&Topic_Title=lookat%28%29+my+sad+math+skills&forum_title=NeHe+Productions&M=False&S=True

It has some very detailed descriptions to WHY it disappears.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS