Browse Source

Merge pull request #383 from Temechon/patch-24

Fix a bug on intersection Enter/Exit triggers
David Catuhe 10 năm trước cách đây
mục cha
commit
4d2876d4e9
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      Babylon/babylon.scene.ts

+ 4 - 1
Babylon/babylon.scene.ts

@@ -1113,6 +1113,9 @@
                             if (indexOfOther > -1) {
                                 sourceMesh._intersectionsInProgress.splice(indexOfOther, 1);
                             }
+                        } else if (areIntersecting && currentIntersectionInProgress === -1 && action.trigger === ActionManager.OnIntersectionExitTrigger) {
+
+                            sourceMesh._intersectionsInProgress.push(otherMesh);
                         }
                     }
                 }
@@ -1665,4 +1668,4 @@
             return this._getByTags(this.materials, tagsQuery).concat(this._getByTags(this.multiMaterials, tagsQuery));
         }
     }
-} 
+}