   FPS Wall Collision
  Hi all,I have a question about FPS wall collision, currently, I have a wall defined as two triangles as you would expect and this method shows if the camera and the wall are colliding.void PhysicsEng::PlayerEnvCollision(ParticleProperties* playerData, Rect3D* Env){float angletotal = 0.0f;float mag1, mag2;D3DXVECTOR3 v1, v2;vector<D3DXVECTOR3> corners = Env->getCorners();for (int i = 0; i < corners.size(); i++){if (i < (corners.size() - 1)){v1 = corners - (*playerData).Position;v2 = corners[i+1] - (*playerData).Position;mag1 = sqrt((pow(v1.x, 2)) + (pow(v1.y, 2)) + (pow(v1.z, 2)));mag2 = sqrt((pow(v2.x, 2)) + (pow(v2.y, 2)) + (pow(v2.z, 2)));angletotal += acos((D3DXVec3Dot(&v1, &v2)) / (mag1 * mag2));}else{v1 = corners - (*playerData).Position;v2 = corners[0] - (*playerData).Position;mag1 = sqrt((pow(v1.x, 2)) + (pow(v1.y, 2)) + (pow(v1.z, 2)));mag2 = sqrt((pow(v2.x, 2)) + (pow(v2.y, 2)) + (pow(v2.z, 2)));angletotal += acos((D3DXVec3Dot(&v1, &v2)) / (mag1 * mag2));}}if (angletotal >= 6.27){}}Sorry for the bad formatting there, but basically, if the total angle is around 2PI then there is a collision. Now i cant seem to find a good way of getting the player to stop at the wall. It seems as the X value of the camera changes from dead center of the plane the distance at which a collision is detected changes in the z-axis if you get what I mean.So basically I want a fool proof way of stopping the player at the wall, so that even if the wall is at an angle the player will rebound correctly, hopefully it wont be too much work from this but I just cant seem to get anything down. Any help is appriciated.
  Never mind, got this solved, just needed to combine this with a plane - point distance method and its all gravy. If anybody else comes here, feel free to message me for help.   