title: Three.js Scene utils detach / attach for character weapons
body: <p>I'm trying to build a FPS with Three.js, and I can't get past some major glitches I'm experiencing with <code>THREE.SceneUtils.detach()</code> and <code>THREE.SceneUtils.attach()</code> (honestly I'm not even sure I should be using them)</p>
  
  <p>My mech character has 2 guns on either side, and there is enough space between the two that a small enemy could fit between the two guns and never get shot. The only solution I could think of was to have the guns "lock on" and follow an enemy when they enter the center of the camera. This solved my issue where an enemy could slip between the guns, but in order to pull this off I followed  WestLangley's idea found here: <a href="https://stackoverflow.com/questions/15603111/three-js-rotate-objects-inside-of-moving-object3d-to-always-face-the-camera#comment22130445_15603613">Three.js Rotate objects inside of moving Object3D to always face the camera</a></p>
  
  <p>So now, my (paraphrased) code looks like this:</p>
  
  <pre><code>autoTarget: function ( target ) {
  
      THREE.SceneUtils.detach( gunRootObject, characterRootObj, scene );
      gunRootObject.lookAt( target );
      gunRootObject.updateMatrix();
  
  
      this.direction = new THREE.Vector3( 0, 0, 1 );
      this.direction.applyQuaternion( gunRootObject.quaternion );
      THREE.SceneUtils.attach( gunRootObject, scene, characterRootObj);
  }
  </code></pre>
  
  <p>This works about 50% of the time. The other 50% both guns end up stuck at [0,0,0] relative to the <code>characterRootObj</code> </p>
  
  <p>Am I doing something obviously wrong? Am I even using the right approach to solve my original issue?</p>
  
  <p>I would greatly appreciate any ideas. Thanks!</p>