title: Converting a Vector3 point to screen space (Vector2) using Three.js [73]
body: <p>I have initialised a perspective camera at a position looking at the origin (0,0,0). Reading around the most common solution to this I've found is the one described here <a href="https://stackoverflow.com/a/27412386/1330719">https://stackoverflow.com/a/27412386/1330719</a>.</p>
  
  <p>From my understanding of the <code>project</code> method is, I should get a vector where the x,y coordinates are between -1 and 1. This doesn't seem to be the case at all and I end up getting coordinates that are completely out of bounds.</p>
  
  <p>Furthermore, if the original vector point is at (0,0,0) I seem to get (NaN, NaN) back. If my camera is looking at position (0,0,0) I expect the Vector3 (0,0,0) to return (width/2, height/2).</p>
  
  <p>In case it is needed, this is how I'm initialising my camera:</p>
  
  <pre><code>this.camera = new THREE.PerspectiveCamera(90, window.innerWidth / window.innerHeight, 1, 10E5);
  
  this.camera.position.set(0, 500, -500);
  this.camera.lookAt(new THREE.Vector3(0,0,0));
  
  this.camera.updateProjectionMatrix();
  </code></pre>
  
  <p>Does anyone have a reason why this might not be working? Or alternatively a recommended way of mapping a Vector3 point to the screen space given a camera?</p>
  
  <p>A jsfiddle of what I mean:
  <a href="https://jsfiddle.net/m78wjLyc/" rel="nofollow noreferrer">https://jsfiddle.net/m78wjLyc/</a></p>