diff --git a/src/rendering/models.ts b/src/rendering/models.ts index d0fba238..04674900 100644 --- a/src/rendering/models.ts +++ b/src/rendering/models.ts @@ -158,7 +158,7 @@ class Object3DCreator { bone = parent_bone; } else { bone = new Bone(); - bone.name = (this.bone_id++).toString(); + bone.name = this.bone_id.toString(); bone.position.set(position.x, position.y, position.z); bone.setRotationFromEuler(euler); @@ -175,6 +175,8 @@ class Object3DCreator { this.model_to_geometry(object.model, matrix); } + this.bone_id++; + if (!break_child_trace) { for (const child of object.children) { this.object_to_geometry(child, bone, matrix);