Original Post
Hello all!
I tried many way to implement a quake-style player movement in direct3d. Whatever i try, i get stuck.
I tried to do the rotation of the camera by hand, so rotate and translate matrices and multiply them to get the view matrix:
Then i tried to abbrevate it using
D3DXMatrixTranslation(&ViewMatrix,fCamTransX,fCamTransY,fCamTransZ); D3DXMatrixRotationYawPitchRoll( &ViewRotMatrix, D3DXToRadian(fCamRotX), D3DXToRadian(fCamRotY), D3DXToRadian(fCamRotZ)); D3DXMatrixMultiply(&ViewMatrix, &ViewMatrix,&ViewRotMatrix);Well... Rotating around the Y-Axis works properly, but when i move the camera and look down the x-axis, the whole world seems to rotate around the x-axis. Now i wanted to use the MatrixLookAtLH method to set up my camera. I know how to move in space relative to where im looking, but i dont know how to calculate the point to look at. I want to implement a quake-like movement and looking, so i will move and rotate the camera. But how can i get a point im looking at from the rotation angles? Is there a tutorial out there that explains how to do it in DirectX 8? All tutorials i could get hold of were about having the look- up and right- vectors of the camera rotated and built their own view matrix. Is there any simple method to do it? Im quite new to d3d programming and want to keep it as simple as possible. Im stuck on this problem for 2 weeks now and i hope you can help me! Thank you! Gerd Brost