Jump to content
  • Advertisement
Sign in to follow this  
irdalama

OpenGL movable camera

This topic is 4416 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 was wondering how i could use a projecton matrix like glFrustum and thne for the viewing matrix create a controllable camera. I want it to translate with the object, but not rotate with it. I am having difficulty, and if anyone can give me any pointers please let me know. im using opengl. this is what im doing so far. I have an object that rotates and translates according to user input. I do this by matrix multiplication. I also have a matrix for the camera. Im trying to get this matrix to follow the object to wherever it translates, but not rotates. My first attempt was to multiply hte translation matrix by the camera matrix in reverse order than that of the helicoptor translation, but it doesnt owrk right since all the objects all seem to translate the same way regardless of the orientation of the object. So, nect i try multplying the objects matrix by the camera matrx by object*camera and get wacked out result. Any pointers? Thanks, lama [Edited by - irdalama on October 15, 2006 1:39:24 AM]

Share this post


Link to post
Share on other sites
Advertisement
wyh don't u just use the object position as the view point and then just subtract a normalized vector from it ( in -view direction ). that would be the camera's position.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!