   View (camera) orientation in world is wrong
  Hi,I created a View (my camera) with the Matrix.LookAtLH() method. I'm able to turn the camera left and right. This works fine so far. Now I want to be able to move the camera in my world. The problem is, that when I've turned the camera view e. g. 90 degrees right and then move the camera forward, the camera goes left (from viewer's perspective).In world coord of cource the cam is moving forward. My question is now, how can i tell the camera that the direction "forward" is the straight direction the camera is looking at?Hope that anybody can help me out of this, cause I'm not knowing how to solve this.Best regardsPikebu   
  You need to transform the cameras position into camera space, then move it forward for the camera to appear to actually move forward.  This is rather simple, just store the various variables you need to make your camera matrix somewhere and then make a camera matrix from them.  Then take the position of the camera and transform it with this matrix, you can then add something to the z coordinate (or whatever) and then transform the position back into world-space using the inverse of the camera matrix.  You then create a new camera matrix using your new position and your done.Another option would be to get the cameras forward vector in camera space (which is likely to be something like 0, 0, 1) and then transform into world space using the inverse of the camera matrix.  You can then multiply the forward vector by the amount you with to move and then add this to the camera's position and then create a new camera matrix using your new position.   ;  Thanks for the fast answer,well, I create my camera matrix the following way:device.Transform.View = Matrix.LookAtLH(new Vector(0,0,0), new Vector(0,0,1), new Vector(0,1,0));So when I understood you correctly my camera position is (0,0,0).How should I now transform it with the matrix?Best regardsPikebu   ;  I'm getting totally frustrated slowly.I searched the whole web, but I didn't found even one example of how to transform camera into world coords. I can't believe that it should be so difficult in DirectX.Doesn't anyone out there has an example for me, how I can transform my camera coords into world coords? Would be great if someone, who understands the stuff Mondo wrote, could put it in some good examples.Best regards Pikebu   ;  It's probably easiest to keep track of your camera's look-at vector to perform these calculations. When you know this, and your original camera position, you're set to go. Here's a quick code snippet that should do what you want.[source lang=c#]Vector3 defaultCamDirection = new Vector3(1, 0, 0); // looking along pos x-axis, needs to be normalized!Vector3 cameraTarget;Vector3 cameraPosition;Vector3 viewMatrix;// v is a vector in world space, relative to the default camera directionpublic void MoveCamera( Vector3 v){  // calculate current camera direction  Vector3 curCamDirection = Vector3.Normalize( cameraTarget - cameraPosition );    // calculate the rotation angle of the camera  // using 2*atan2(|u-v|, |u+v|)  float angle = 2f * (float)Math.Atan2( Vector3.Subtract(defaultCamDirection, curCamDirection).Length(), Vector3.Add(defaultCamDirection, curCamDirection).Length() );    // construct a rotation matrix for the camera rotation  Matrix camRotMat = Matrix.RotationAxis( Vector3.Cross( defaultCamDirection, curCamDirection), angle);    // transform the movement vector v to current camera direction  Vector4 vT = Vector3.Transform(v, camRotMat);  v = new Vector3( vT.X, vT.Y, vT.Z );  // apply the transformed movement to the camera  cameraTarget += v;  cameraPosition += v;  // update view matrix  viewMatrix = Matrix.LookAtLH( cameraPosition, cameraTarget, new Vector3(0, 1, 0));}It's untested and written verbatim, so it may contain some errors. You also might need to check on the camera up direction for completeness, but it should work this way.   ;  I'm currently working on this solution too.  I have a working version that I currently use but may be incorrect (still checking).  I stored the camera position, target and updir and simply move those around and re-create the view matrix based on them after each operation.   