Original Post
Hi I am relatively new to DirectX programming. I have a box that I can move right, left, down and up in sort of 2D. I achieve this using the following code. My problem and question is that if I use the code within section 2 this results in a two-point perspective transformation which isn't good for me. By this I mean that objects far away from the center of sight distort. What I would like instead is a sort of 1-point perspective which could imitate a 2-dimensional room. But if I comment out the 3 rows within section 2, nothing will appear. // section 1 D3DXVECTOR3 vEyePt( eyeX, eyeY,-5.0f ); D3DXVECTOR3 vLookatPt( eyeX, eyeY, 0.0f ); D3DXVECTOR3 vUpVec( eyeX, eyeY + 100, -5.0f); D3DXMATRIXA16 matView; D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec ); g_pd3dDevice->SetTransform( D3DTS_VIEW, &matView ); // section 2 D3DXMATRIXA16 matProj; D3DXMatrixPerspectiveFovLH( &matProj, D3DX_PI / 4, 1.0f, 1.0f, 100.0f ); g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj ); Thanks for any piece of help.