瀏覽代碼

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

Ben Houston 12 年之前
父節點
當前提交
3cdefd64e6
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 );