title: Three.js Precision Terrain Collision
body: <p>'ve been working on a game engine using the WebGL library Three.js. I have basic terrain collision working to the point where I can find the face the user is standing on. Using the average or maximum Y position of the faces vertices is not sufficient.</p>
  
  <p>What formula can I use to find the exact Y position of an object relative to the terrain face that is "standing" on? Assuming I know the faces four vertex positions and the objects vector position.</p>
  
  <p><img src="https://i.stack.imgur.com/U75PC.png" alt="enter image description here"></p>
  
  <p>The plane is a THREE.PlaneGeometry(2000,2000,128,128) augmented by a heightmap. The image above is one of it's faces.</p>