   car camera
  excuse me for asking dumb questions, been a member for a while but never posted before.  im making the camera for a car game im making(d3d). the acceleration works to an extent but as soon as i rotate the camera the forward and backwards turn into a strafe. im not sure how to fix this. i can move forward and backwards all i want and it will work untill the rotation happens. so im presuming its something to do with the move_camera function tat is not recording where it is facing anymore. any help would be great. only other part of the function is the building of the view and the control using dxinput. thanksfloat camera_vz = 0.0;float camera_pz = 0.0;void Camera::Move_Camera(float acc){tVector3 vVector = mView - mPos;// Get the view vector//acc = 0.2;// forward positive camera speed and backward negative camera speed.    float dt = 0.1;    camera_vz = camera_vz + acc*dt; camera_pz = mPos.z;camera_pz = camera_pz + camera_vz*dt;mPos.x  = mPos.x  + vVector.x * acc;mPos.z  = mPos.z  + vVector.z * acc;    mPos.z  = camera_pz;mView.x = mView.x + vVector.x * acc;mView.z = mView.z + vVector.z * acc;}void Camera::Rotate_View(float acc){tVector3 vVector = mView - mPos;mView.z = (float)(mPos.z + sin(acc)*vVector.x + cos(acc)*vVector.z);mView.x = (float)(mPos.x + cos(acc)*vVector.x - sin(acc)*vVector.z);}[Edited by - markhuntley on January 6, 2006 6:49:42 AM]
  If I was doing something like this with the camera, I'd be using a different way of using the camera.The car would be using it's own x,y and rotation flag.And the camera would be set at each frame depending on the car's x,y, and rotation flag.The camera update procedure will set the camera's matrix using the matrix procedures to set position and rotation.   