title: THREE.js: OrbitControls pan in z axis with PerspectiveCamera
body: <p>I am using the <a href="https://github.com/mrdoob/three.js/blob/master/examples/js/controls/OrbitControls.js" rel="nofollow">OrbitControls</a> class and I am trying to replace the panUp function by panFront. My objective is to move the camera along the z axis.</p>
  
  <p>I did the following change but seems that it doesn't work:</p>
  
  <pre><code>var panFront = function() {
  
      var v = new THREE.Vector3();
  
      return function panFront( distance, objectMatrix ) {
  
          v.setFromMatrixColumn( objectMatrix, 2 ); // get Z column of objectMatrix
          v.multiplyScalar( distance );
  
          panOffset.add( v );
      };
  
  }();
  </code></pre>