소스 검색

Check useOctreeForRenderingSelection is true before checking if _submeshesOctree is defined.

Michael Schlotfeldt 7 년 전
부모
커밋
954627c518
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/babylon.scene.ts

+ 1 - 1
src/babylon.scene.ts

@@ -3121,7 +3121,7 @@
                 var len: number;
                 var subMeshes: SubMesh[];
 
-                if (mesh._submeshesOctree && mesh.useOctreeForRenderingSelection) {
+                if (mesh.useOctreeForRenderingSelection === true && mesh._submeshesOctree !== undefined && mesh._submeshesOctree !== null) {
                     var intersections = mesh._submeshesOctree.select(this._frustumPlanes);
 
                     len = intersections.length;