Przeglądaj źródła

fixed line precision raycasting outside the bounding sphere of Line

Marc-Sefan Cassola 8 lat temu
rodzic
commit
02c2487edd
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/objects/Line.js

+ 1 - 0
src/objects/Line.js

@@ -55,6 +55,7 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 			sphere.copy( geometry.boundingSphere );
 			sphere.applyMatrix4( matrixWorld );
+			sphere.radius += precision;
 
 			if ( raycaster.ray.intersectsSphere( sphere ) === false ) return;