瀏覽代碼

Bug fixing

Raanan Weber 9 年之前
父節點
當前提交
d5cdd6efd7
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 2 2
      src/Mesh/babylon.abstractMesh.ts
  2. 3 3
      src/babylon.scene.ts

+ 2 - 2
src/Mesh/babylon.abstractMesh.ts

@@ -764,7 +764,7 @@
                 options = impostor;
                 impostor = impostor.impostor;
             }
-            this.physicsImpostor = new PhysicsImpostor(this, impostor, options);
+            this.physicsImpostor = new PhysicsImpostor(this, impostor, options, this.getScene());
             return this.physicsImpostor.physicsBody;
         }
 
@@ -1080,7 +1080,7 @@
 
             // Physics
             if (this.physicsImpostor) {
-                this.physicsImpostor.dispose(!doNotRecurse);
+                this.physicsImpostor.dispose(/*!doNotRecurse*/);
             }
 
             // Intersections in progress

+ 3 - 3
src/babylon.scene.ts

@@ -2551,14 +2551,14 @@
             }
 
             var mainMesh: AbstractMesh = parts[0].mesh;
-            mainMesh.physicsImpostor = new PhysicsImpostor(mainMesh, parts[0].impostor, options)
+            mainMesh.physicsImpostor = new PhysicsImpostor(mainMesh, parts[0].impostor, options, this)
             for (var index = 1; index < parts.length; index++) {
                 var mesh: AbstractMesh = parts[index].mesh;
                 if (mesh.parent !== mainMesh) {
                     mesh.position = mesh.position.subtract(mainMesh.position);
                     mesh.parent = mainMesh;
                 }
-                mesh.physicsImpostor = new PhysicsImpostor(mesh, parts[index].impostor, options)
+                mesh.physicsImpostor = new PhysicsImpostor(mesh, parts[index].impostor, options, this)
 
             }
             mainMesh.physicsImpostor.forceUpdate();
@@ -2566,7 +2566,7 @@
 
         public deleteCompoundImpostor(compound: any): void {
             var mesh: AbstractMesh = compound.parts[0].mesh;
-            mesh.physicsImpostor.dispose(true);
+            mesh.physicsImpostor.dispose(/*true*/);
             mesh.physicsImpostor = null;
         }