   Chase Camera
  Hi guys,So I have been trying to find a fix for my chase camera, which doesn't seem to be working. I have searched on google for a tutorial and found the reimers one, but unfortunately I can't seem to get that to work. Basically what is happening is I have the position of the camera set to just behind the plane model. Then when I turn the plane, the camera turns as well, but it isn't in sync with the plane so the camera is now not directly behind the plane.Screenshot:How would I get this to work?Any clarification on the matter would be brilliant thanks!   
  How do you handle camera position/orientation? Matrices? Quaternions? If you show your camera control code we might be able to help you better.   ;  This is of course for Direct 3D, but the matrix constuction is the same using the same data no matter the system.D3DXMATRIXA16 matView;D3DXMatrixLookAtLH( &matView, &D3DXVECTOR3(x - (cos(heading - 4.71f) * 10), y + 3.0f, z - (-sin(heading - 4.71f) * 10)), &D3DXVECTOR3(x, y ,z), &D3DXVECTOR3(0.0f, 1.0f, 0.0f));this->device->SetTransform(D3DTS_VIEW, &matView);Find more info on what D3DXMatrixLookAtLH does here D3DXMatrixLookAtLH; protected override void Update(GameTime gameTime)   {  float deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;  Vector3 moveVector = Vector3.Zero;  Vector3 cameraMoveVector = Vector3.Zero;    float cameraPitchValue = 0.0f;  float cameraYawValue = 0.0f;  float planeYawValue = 0.0f;  float planePitchValue = 0.0f;  // Allows the game to exit  if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit();  KeyboardState kState = Keyboard.GetState();  MouseState mState = Mouse.GetState();  if (kState.IsKeyDown(Keys.Escape))  { this.Exit();  }  if (kState.IsKeyDown(Keys.Space))  { moveVector.Z += 10.0f * deltaTime;  if (kState.IsKeyDown(Keys.Up)) {plane.rotation.X -= 0.1f * deltaTime;moveVector.Y += 3.0f * deltaTime; } if (kState.IsKeyDown(Keys.Down)) {plane.rotation.X += 0.1f * deltaTime;moveVector.Y -= 3.0f * deltaTime; }  }   if (kState.IsKeyDown(Keys.W))  { cameraMoveVector.Z += 3.0f * deltaTime;  }  if (kState.IsKeyDown(Keys.S))  { cameraMoveVector.Z -= 3.0f * deltaTime;  }  if (kState.IsKeyDown(Keys.A))  { cameraYawValue = -1; cameraMoveVector.X += 3.0f * deltaTime;  }  if (kState.IsKeyDown(Keys.D))  { cameraYawValue = 1; cameraMoveVector.X -= 3.0f * deltaTime;  }  if (kState.IsKeyDown(Keys.Left))  {  planeYawValue = -1; plane.rotation.Y = planeYaw;  }  if (kState.IsKeyDown(Keys.Right))  { planeYawValue = 1; plane.rotation.Y = planeYaw;  }  // TODO: Add your update logic here  planeYaw -= (planeYawValue * 3.4f) * deltaTime;  planePitch += (planePitchValue * 3.4f) * deltaTime;  cameraPitch += (cameraPitchValue * 0.4f) * deltaTime;  cameraYaw -= (cameraYawValue * 0.4f) * deltaTime;  cameraPitch = MathHelper.Clamp(cameraPitch, MathHelper.ToRadians(-89.9f), MathHelper.ToRadians(89.9f));  Matrix cameraViewRotationMatrix = Matrix.CreateRotationX(cameraPitch) * Matrix.CreateRotationY(cameraYaw);  Matrix cameraMoveRotationMatrix = Matrix.CreateRotationY(cameraYaw);  Vector3 transformedCameraReference = Vector3.Transform(cameraReference, cameraViewRotationMatrix);  Matrix planeMoveRotationMatrix = Matrix.CreateRotationY(planeYaw);  Matrix planeViewRotationMatrix = Matrix.CreateRotationX(planePitch) * Matrix.CreateRotationY(planeYaw);  Vector3 transformerPlaneReference = Vector3.Transform(planeReference, planeViewRotationMatrix);  Matrix planeUpDownRotationMatrix = Matrix.CreateRotationX(planePitch);    cameraPosition += Vector3.Transform(moveVector, planeMoveRotationMatrix);  plane.position += Vector3.Transform(moveVector, planeMoveRotationMatrix);  cameraPosition = Vector3.Transform(cameraPosition, Matrix.CreateFromQuaternion(planeQuat));  up = Vector3.Transform(Vector3.Up, Matrix.CreateFromQuaternion(planeQuat));    cameraTarget = transformerPlaneReference + cameraPosition;    base.Update(gameTime);   }This is my update module. I had a look at the DX code and its all greek to me..   