Ver Fonte

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

Ben Houston há 12 anos atrás
pai
commit
3cdefd64e6
1 ficheiros alterados com 1 adições e 1 exclusões
  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 );