   camera with direct3d9
  Hi, i have a question about camera with direct3d9,with these lines...   D3DXVECTOR3 eye_vector;D3DXVECTOR3 lookat_vector;D3DXVECTOR3 up_vector;D3DXMATRIX view_matrix;eye_vector=D3DXVECTOR3(0.0f,10.0f,0.0f);lookat_vector=D3DXVECTOR3(0.0f,0.0f,0.0f);up_vector=D3DXVECTOR3(0.0f,1.0f,0.0f);D3DXMatrixLookAtLH(&view_matrix,&eye_vector,  &lookat_vector,  &up_vector);d3d_device->SetTransform(D3DTS_VIEW,&view_matrix);...i build a view matrix so to have a camera positioned at (0,10,0) in world coordinates looking at origin(0,0,0) and with Y up axis...but...how have i to build a view matrix so that the camera haven''t to looking at a fixed point? is there a way to do it?(eg. how can i have a camera positioned at (o,10,0) that look straigh without looking at a fixed point lock?)ThanksKev 
  Your camera has to look SOMEwhere. You say straight, so straight obviously is somewhere. That''s the whole point of having a camera. When you move or strafe the camera it''s still looking in a direction, maybe the old lookat point, maybe not. ;  Yes, ok, but how can i look up or down without modify the direction the camera is moving? ;  look at the dx9 docs to check what the lookat functions really do. then throw it away, because unless its 3rd person you want to look in a direction not at a point. ;  That''s what i want, look in a direction and not a point, i would build a matrix to look in a direction to pass to d3d_device->SetTransform(D3DTS_VIEW,&matrix);how can i build this up? ;  Why not make the lookat point the camera position plus the direction vector? ;  what you want is look somewhere and still move in the same direction like any FPS HL where you use the mouse to look around and you still move in the same direction unlike if you make the camera point up when you move youll fly off the ground...ive been lookin on how to do this too but havent figured it out ;  When you want to move in one direction but maintain the look vector add the movement vector to both the camera position and the lookat point. ;  what about taking the camera direction and assigning the Up Component 0 (Z component in my book... Y in alot of other peoples) and then normalizing it... that gives you a vector pointing in the direction you want to move on the movement plane, This is also why some FPS's don't allow you to look directy up or down but just enough... then add gravity etc to your player...Most fps programs just store 2 angles.. the Facing angle and the Look up/down angle.. then it's mearly something like the vector(cos(playerangle), sin(playerangle), 0) for the movement and the camera vector is similar except you have to add the up down vector to that. I have code for that buried somewhere in my old machine but it's currently dead.. but it'd just be easier to make 2 rotation matricies, concatinate them and multiply a point by it to get your camera lookat direction.some pseudo codeRotationMatrix.Identity()RotationMatrix.RotateZ(Player.Angle)RotationMatrix.RotateY(Player.LookUpDown)Camera.Up = Vector(0, 0, 1);Camera.From = Player.Pos;Camera.To = PlayerPos + Vector(1, 0, 0) * RotationMatrix;   Edit: typo   [edited by - Ximmer on February 8, 2004 2:59:33 AM];  I always think view matrix as inverse of camera position. So, just update player postion, and put inverse of that matrix as view matrix. However, you`ll have to modify angles of camera position a bit if player wish to look up/down. 