Browse Source

Merge pull request #1528 from noalak/master

Do not clone mesh parent
David Catuhe 8 năm trước cách đây
mục cha
commit
d31c65118c
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      src/Mesh/babylon.mesh.ts

+ 5 - 2
src/Mesh/babylon.mesh.ts

@@ -141,9 +141,12 @@
                 }
 
                 // Deep copy
-                Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances"], ["_poseMatrix"]);
+                Tools.DeepCopy(source, this, ["name", "material", "skeleton", "instances", "parent"], ["_poseMatrix"]);
 
-                // Pivot                
+                // Parent
+                this.parent = source.parent;
+
+                // Pivot
                 this.setPivotMatrix(source.getPivotMatrix());
 
                 this.id = name + "." + source.id;