Sign in to follow this  
smally

Camera Techniques

Recommended Posts

smally    122
Hi, I'm currently trying to implement a flexible camera for my game and I've been following the DXUT (with DirectX) camera class for more help. I've been noticing a few techniques they use to obtain more data, e.g.
D3DXMATRIX mInvView;
D3DXMatrixInverse( &mInvView, NULL, &m_mView );
D3DXVECTOR3* pZBasis = (D3DXVECTOR3*) &mInvView._31;

m_fCameraYawAngle   = atan2f( pZBasis->x, pZBasis->z );
float fLen = sqrtf(pZBasis->z*pZBasis->z + pZBasis->x*pZBasis->x);
m_fCameraPitchAngle = -atan2f( pZBasis->y, fLen );
Is there anywhere online or even in a book that has some techniques like this in order to build a more advanced camera?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this