Browse Source

fixed line precision raycasting outside the bounding sphere of Line

Marc-Sefan Cassola 7 years ago
parent
commit
02c2487edd
1 changed files with 1 additions and 0 deletions
  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;