Archived

This topic is now archived and is closed to further replies.

gluLookAt()

This topic is 5114 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

Can someone help, I''m using gluLookAt() to move round my scene, if I want to move the camera up, down, left, right and zoom in/out it works fine; however if I rotate the camera then the problems start. Firstly I get stuck at 90 degrees and secondly once I''ve rotated the camera the other movements do not update with it, ie if I try to zoom in I zoom along the original z axis and not where the camera is pointing. I tried just using glRotatef() and glTranslatef() instead, the rotation worked fine, but the movements were reversed if the camera was, ie if I faced away from the original camera position then zoom in was actually zoom out, right was left that kind of thing. Any suggestions would be most appreciated.

Share this post


Link to post
Share on other sites
Be careful of the order in which you perform your transformations.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites