Im trying to create a plane on the X/Y Plane, im setting up my Camera on the Z axis as shown in the image attached
When using the D3DXMatrixLookAtLH function i set these parameters:
My first question is: Why is it that when i change the vUpVec to (0.0f, 0.0f, 1.0f), i dont get anything on my screen when i render, but it should be right, im using the Z axis for up.Code:D3DXVECTOR3 vLookatPt(0, 0, 0); D3DXVECTOR3 vUpVec(0.0f, 1.0f, 0.0f); D3DXVECTOR3 vEyePt(0, 0, -25); D3DXMatrixLookAtLH(&Matrix, &vEyePt, &vLookatPt, &vUpVec);
Second question: The plane i drew is a perfect square, 5x5, but when it renders, i get a rectangle, why is that?
Heres the code for the Projection and World matrix:
Any help would be appreciated, thanks.Code:D3DXMatrixIdentity(&Matrix); g_Device->SetTransform(D3DTS_WORLD, &Matrix); D3DXMatrixPerspectiveFovLH(&Matrix, D3DXToRadian(45), 1.0f, 1.0f, 50.0f); g_Device->SetTransform(D3DTS_PROJECTION, &Matrix);