D3DXVECTOR3 m_pos;
D3DXVECTOR3 pos;
D3DXVECTOR3 lookAt;
D3DXVECTOR3 up;
D3DXMATRIX m_cameraMatrix;
D3DXMATRIX translate, result;
D3DXMatrixLookAtRH(&m_cameraMatrix, &pos, &lookAt, &up);
D3DXMatrixIdentity(&translate);
D3DXMatrixTranslation(&translate, m_pos.x, m_pos.y, m_pos.z);
result = m_cameraMatrix * translate;
return result;
I want to move camera to m_pos position, as i do it with world matrix, but it seems it doesn't work, any ideas?