   Matrices Help.
  Hi Gamedev!My name is Andrew and I'm having a little trouble with Matrices.I've tried stepping through my code and haven't got anywhere. I'vehardcoded values to see if it would solve it and yet, nothing.I've read tutorials and went through documentationa and the includedfile in the DirectX SDK. I've seen it work in other applications but,not in mine.Here is my code.//View MatrixeyeVector = _eyeVector;lookAtVector = D3DXVECTOR3( 0.0f, 0.0f, 0.0f);upVector =  D3DXVECTOR3( 0.0f, 1.0f, 0.0f);D3DXMatrixLookAtLH(&viewMatrix, &eyeVector, &lookAtVector, &upVector);d3ddev->SetTransform(D3DTS_VIEW, &viewMatrix);//Projection MatrixD3DXMatrixPerspectiveFovLH(&projectionMatrix, D3DX_PI/4, 1.3f, 1.0f, 100.0f);d3ddev->SetTransform(D3DTS_PROJECTION, &projectionMatrix);//World MatrixD3DXMatrixIdentity(&worldMatrix);d3ddev->SetTransform(D3DTS_WORLD, &worldMatrix);//ViewportviewPort.X = 0;viewPort.Y = 0;viewPort.Width = 800;viewPort.Height = 600;viewPort.MinZ = 0.0f;viewPort.MaxZ = 1.0f;d3ddev->SetViewport(&viewPort);
  Hi,I've looked at your code and seen nothing wrong. I couldn't understand your problem. What is it? For example, can't you see anything while running your app? Or, you see something weird?Can you describe your problem /w more details?   ;  It just won't transform, I don't see my triangle 8.0f father away.   ;  Why 8.0f? There is no 8.0f in your code :)   ;  //I know, Camera.IFakePeaceCamera(d3ddev, D3DXVECTOR3(0.0f, 0.0f, -8.0f));   ;What is eyeVector = _eyeVector; actual value?Set it to -8,0,0 if you have set lookat to 0,0,0or to 8,0,0 if triangles face outward.If you still do not see triangle try this at z axis as well(0,0,-8) and (0,0,8).If still nothing try y vertical axis.;  I've tried D3DXVECTOR3(-8.0f, -8.0f,-8.0f). Withoutavail. I can see my triangle, its just that the eyewon't move.   ;  What is the vertex format you've set with IDirect3DDevice9::SetFVF? Do you provide the fourth vector element w for the triangle vertices?   ;  I've set RHW.When I don't turn of back face culling, it won't show up.   ;  I suppose you mean D3DFVF_XYZRHW.Quote:DirectX Graphics DocumentationD3DFVF_XYZRHW - Vertex format includes the position of a transformed vertex. This means that the vertices are considered already transformed by the application. Direct3D ignores the transformation matrices in this mode. Use D3DFVF_XYZ or D3DFVF_XYZ | D3DFVF_DIFFUSE instead. You may find more information on the reference page.