vec_rotate(TraceCoords.x, player.pan); shouldn't that be camera.pan or ...