Siwko
05-03-2001, 09:33 AM
Well, it's once again time for the "I'm too stupid (or lazy) to figure this out myself" zone.
Basically, I'm wondering how to create a "camera" system in 3D (not really just OpenGL, but in general). What I'm looking for is a way to structure and control the movement of an object, which for all intents can be considered a "camera".
I currently have a little structure which is capable of storing the location and orientation of the "camera", but it's actually controlling it that is the problem. From it's initial resting point, sure, I can translate it cumulatively in any direction. But the problem is that these coordinates are in raw world coordinates. Now say I want to always move "forward", but rather than +ZAxis of the world, I want to move forward alone the local ZAxis of the camera? How do I go about doing this? How do I accumulate and store this into the camera object?
Do we all understand what I'm asking? Basically, I want to replicate the first-person "camera" and control of something like Quake 3 or CS (or whatever).
Hit me. http://www.opengl.org/discussion_boards/ubb/smile.gif
Siwko
Basically, I'm wondering how to create a "camera" system in 3D (not really just OpenGL, but in general). What I'm looking for is a way to structure and control the movement of an object, which for all intents can be considered a "camera".
I currently have a little structure which is capable of storing the location and orientation of the "camera", but it's actually controlling it that is the problem. From it's initial resting point, sure, I can translate it cumulatively in any direction. But the problem is that these coordinates are in raw world coordinates. Now say I want to always move "forward", but rather than +ZAxis of the world, I want to move forward alone the local ZAxis of the camera? How do I go about doing this? How do I accumulate and store this into the camera object?
Do we all understand what I'm asking? Basically, I want to replicate the first-person "camera" and control of something like Quake 3 or CS (or whatever).
Hit me. http://www.opengl.org/discussion_boards/ubb/smile.gif
Siwko