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