Hey recently I have been trying to make a good working camera in DirectX 9 but I have had problems. So let me show you some of my code.
I don't use the D3DXMatrixLookAtLH
function because i want to rotate the camera too.
D3DXMATRIX matView,
matVTranslate,
matVYaw,
matVPitch,
matVRoll;
D3DXTranslation(&matVTranslate, x, y, z);
D3DXRotationY(&matVYaw, yaw);
D3DXRotationX(&matVPitch, pitch);
D3DXRotationZ(&matVRoll, roll);
matView = matVTranslate * (matVPitch * matVYaw * matVRoll);
d3ddev->SetTransform(D3DTS_VIEW, &matView);
It creates a very weird effect. Is there a better way to create a fps camera? Here is the exe if you'd like to run the program. The Exe if you'd like the code please let me know. Thank you.