public Matrix4x4 GetRootMatrix() { TreeGroup parentGroup = this; while (parentGroup.parentGroup != null) { parentGroup = parentGroup.parentGroup; } return parentGroup.nodes[0].matrix; }