{"record":{"id":"747fc842222bccbd","repo":"stride3d/stride","slug":"the-specified-nodename-doesn-t-exist-in-the-model-hierarchy","errorCode":null,"errorMessage":"The specified NodeName doesn't exist in the model hierarchy.","messagePattern":"The specified NodeName doesn't exist in the model hierarchy\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Physics/Elements/PhysicsSkinnedComponentBase.cs","lineNumber":47,"sourceCode":"            if (string.IsNullOrEmpty(NodeName) || Data.ModelComponent?.Skeleton == null) return;\n\n            if (!Data.BoneMatricesUpdated)\n            {\n                Vector3 position, scaling;\n                Quaternion rotation;\n                Entity.Transform.WorldMatrix.Decompose(out scaling, out rotation, out position);\n                var isScalingNegative = scaling.X * scaling.Y * scaling.Z < 0.0f;\n                Data.ModelComponent.Skeleton.NodeTransformations[0].LocalMatrix = Entity.Transform.WorldMatrix;\n                Data.ModelComponent.Skeleton.NodeTransformations[0].IsScalingNegative = isScalingNegative;\n                Data.ModelComponent.Skeleton.UpdateMatrices();\n                Data.BoneMatricesUpdated = true;\n            }\n\n            BoneIndex = Data.ModelComponent.Skeleton.Nodes.IndexOf(x => x.Name == this.NodeName);\n\n            if (BoneIndex == -1)\n            {\n                throw new InvalidOperationException(\"The specified NodeName doesn't exist in the model hierarchy.\");\n            }\n\n            BoneWorldMatrixOut = BoneWorldMatrix = Data.ModelComponent.Skeleton.NodeTransformations[BoneIndex].WorldMatrix;\n        }\n    }\n}\n","sourceCodeStart":29,"sourceCodeEnd":54,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Physics/Elements/PhysicsSkinnedComponentBase.cs#L29-L54","documentation":"PhysicsSkinnedComponentBase.SetupBoneLink() resolves the bone index by searching the model's skeleton node list for NodeName. If no node matches, BoneIndex stays -1 and it throws InvalidOperationException, because the component cannot track a bone that does not exist in the hierarchy.","triggerScenarios":"Setting NodeName to a string that does not match any skeleton node name; renaming the node in the model after the component was configured; attaching the component to a different model whose skeleton lacks that node.","commonSituations":"Model re-export/renaming in DCC tools breaks node names; copy-pasting a component between entities with different models; case-sensitivity or whitespace mismatches in node names.","solutions":["Set NodeName to a node that exists in Data.ModelComponent.Skeleton.Nodes (check exact spelling/case)","Re-assign NodeName after swapping or reimporting the model asset","Verify the ModelComponent/Skeleton is assigned and its nodes are loaded before setup"],"exampleFix":"// before\ncomponent.NodeName = \"Bone_Arm_L\"; // node renamed to \"Arm_L\" in model\n// after\ncomponent.NodeName = \"Arm_L\"; // matches a node in the skeleton hierarchy","handlingStrategy":"validation","validationCode":"bool exists = component.Data?.ModelComponent?.Skeleton?.Nodes.Any(n => n.Name == component.NodeName) == true;\nif (!exists) throw new InvalidOperationException($\"Node '{component.NodeName}' not found in skeleton.\");","typeGuard":null,"tryCatchPattern":"try { component.SetupBoneLink(); }\ncatch (InvalidOperationException) { /* fix NodeName or model */ }","preventionTips":["Verify NodeName against the model's actual skeleton node names","Re-check node names after reimporting or renaming models","Log available node names to debug mismatches"],"tags":["physics","skeleton","csharp"],"backgroundTag":"resource-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}