Skip to content

Commit

Permalink
Merge pull request #1 from washstar/washstar-patch-1
Browse files Browse the repository at this point in the history
fix intersectsBox
  • Loading branch information
washstar authored Jul 23, 2018
2 parents 7d29bcf + 42c50f3 commit 0b0e1fe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/objects/Mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,9 @@ Mesh.prototype = Object.assign( Object.create( Object3D.prototype ), {

// Check boundingBox before continuing

if ( geometry.boundingBox !== null ) {

if ( ray.intersectsBox( geometry.boundingBox ) === false ) return;

}
if ( geometry.boundingBox === null ) geometry.computeBoundingBox();

if ( ray.intersectsBox( geometry.boundingBox ) === false ) return;

var intersection;

Expand Down

0 comments on commit 0b0e1fe

Please sign in to comment.