Jump to content
  • Advertisement

Archived

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

Grizwald

manual matrix multiplication

This topic is 5768 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 am using gluUnProject to get my mouse coordinates in 3D, but i can''t get it to work with my view (looking down the Y axis) because it only ever gives me a 1 for the Z value. This brings me to my question: Could i do gluUnProject before ANY modelview transformations,save the matrix to a mouse matrix or something, and then after getting my view matrix (after setting the camera of course) via glGetFloatv, and multiply mouse matrix * view matrix = good mouse. how would i put the untransformed values into a matrix, and then get them out again? sorry if this doesn''t make sense to you. I''d be more than happy to clarify if you need it. Thank in advance! -Cody

Share this post


Link to post
Share on other sites
Advertisement
>>I am using gluUnProject to get my mouse coordinates in 3D, but i can''t get it to work with my view (looking down the Y axis) because it only ever gives me a 1 for the Z value. This brings me to my question:<<

are u using readpixels to get the depth value.
see the faq for an example (www.opengl.org right side)

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites

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