diff --git a/public/arena.html b/public/arena.html index 5360f19..f78c87f 100644 --- a/public/arena.html +++ b/public/arena.html @@ -96,7 +96,7 @@ - + diff --git a/public/builder.html b/public/builder.html index 2e6d5be..4e696b1 100644 --- a/public/builder.html +++ b/public/builder.html @@ -86,7 +86,7 @@ - + diff --git a/public/index.html b/public/index.html index 6cabfde..e634ac4 100755 --- a/public/index.html +++ b/public/index.html @@ -187,7 +187,7 @@ - + diff --git a/public/js/worlds/World_Base.js b/public/js/worlds/World_Base.js index e9fc8ec..c72925f 100644 --- a/public/js/worlds/World_Base.js +++ b/public/js/worlds/World_Base.js @@ -503,7 +503,13 @@ var World_Base = function() { } // Compute all world matrices in order - self.computeAllWorldMatrices(scene.meshes); + let parentlessMeshes = []; + for (let mesh of scene.meshes) { + if (mesh.parent == null) { + parentlessMeshes.push(mesh); + } + } + self.computeAllWorldMatrices(parentlessMeshes); // Remove designated parents, keeping transform self.removeParents(self.parentsToRemove); @@ -532,7 +538,7 @@ var World_Base = function() { this.computeAllWorldMatrices = function(meshes) { for (let mesh of meshes) { mesh.computeWorldMatrix(true); - let childMeshes = mesh.getChildMeshes(); + let childMeshes = mesh.getChildren(); if (childMeshes.length > 0) { self.computeAllWorldMatrices(childMeshes); }