Jump to content
  • Advertisement

Archived

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

gowron67

OpenGL OpenGL view matrix

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

I'm creating a camera class which creates its own view matrix as I don't intend to use things like glTranslate and glRotate.... I'm using quaternions for the orientation of the camera and then converting to a rotation matrix to pass to OpenGL using glLoadMatrix... the view matrix I'm creating is.... 1- 2(y2 + z2 ) || 2xy - 2zw || 2xz + 2yw || -pos.x 2yx + 2zw || 1 - 2(x2 + z2) || 2yz - 2xw || -pos.y 2xz - 2yw || 2zy + xw || 1- 2(x2 + y2) || -pos.z 0 || 0 || 0 || 1 where pos is my camera position... and the rest is a standard quaternion to matrix conversion... the problem i'm having is that if I call my function set camera position along with setting a new orientation, the camera doesn't seem to translate along the right axis.....I'm aware of gimbal lock but I didn't think that came into play here. Isn't this the way openGL does it internally ? [edited by - gowron67 on March 23, 2003 6:00:20 PM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!