We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
raycast()
1 parent edb16f9 commit 3ddaae1Copy full SHA for 3ddaae1
src/objects/InstancedMesh.js
@@ -136,6 +136,17 @@ class InstancedMesh extends Mesh {
136
137
if ( _mesh.material === undefined ) return;
138
139
+ // test with bounding sphere first
140
+
141
+ if ( this.boundingSphere === null ) this.computeBoundingSphere();
142
143
+ _sphere.copy( this.boundingSphere );
144
+ _sphere.applyMatrix4( matrixWorld );
145
146
+ if ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;
147
148
+ // now test each instance
149
150
for ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) {
151
152
// calculate the world matrix for each instance
0 commit comments