PDA

View Full Version : Cemera help....



detzel
02-23-2001, 11:22 AM
I have an object that moves around the screen fine but what I want is the camera to look like its following the object. How can I do this so when I rotate the objec the camera moves into the correct position. Check out my source at: http://oz.plymouth.edu/~r_detzel/Lesson1.cpp

Elixer
02-23-2001, 10:00 PM
Don't you just love classword? http://www.opengl.org/discussion_boards/ubb/smile.gif The camera will be doing the opposite of what you object is doing. (Like looking into a mirror, object move left, camera sees right, and so on.)

You can use gllookat() if you want, just plug the negated values of your object position +- a few, since you want to see the object also.

detzel
02-24-2001, 06:49 AM
Did you mean classwork? Anyways, its not classwork but rather a project im doing in my spare time to learn opengl.