Browse Source

remove Raycaster dependence on face.centroid, instead use 1st vertex of the face (vertices[face.a]).

Ben Houston 12 years ago
parent
commit
3cdefd64e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Raycaster.js

+ 1 - 1
src/core/Raycaster.js

@@ -99,7 +99,7 @@
 
 				if ( material === undefined ) continue;
 				
-				facePlane.setFromNormalAndCoplanarPoint( face.normal, face.centroid );
+				facePlane.setFromNormalAndCoplanarPoint( face.normal, vertices[face.a] );
 
 				var planeDistance = localRay.distanceToPlane( facePlane );