Browse Source

Merge pull request #1528 from noalak/master

Do not clone mesh parent
David Catuhe 8 years ago
parent
commit
d31c65118c
1 changed files with 5 additions and 2 deletions
  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;