Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Given the current ModelView matrix, how can I determine the object-space location of the camera?

0
Posted

Given the current ModelView matrix, how can I determine the object-space location of the camera?

0

The “camera” or viewpoint is at (0., 0., 0.) in eye space. When you turn this into a vector [0 0 0 1] and multiply it by the inverse of the ModelView matrix, the resulting vector is the object-space location of the camera. OpenGL doesn’t let you inquire (through a glGet* routine) the inverse of the ModelView matrix. You’ll need to compute the inverse with your own code.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.