stride3d/stride · error · InvalidOperationException
The specified NodeName doesn't exist in the model hierarchy.
Error message
The specified NodeName doesn't exist in the model hierarchy.
What it means
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.
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
Example fix
// before component.NodeName = "Bone_Arm_L"; // node renamed to "Arm_L" in model // after component.NodeName = "Arm_L"; // matches a node in the skeleton hierarchy
Defensive patterns
Strategy: validation
Validate before calling
bool exists = component.Data?.ModelComponent?.Skeleton?.Nodes.Any(n => n.Name == component.NodeName) == true;
if (!exists) throw new InvalidOperationException($"Node '{component.NodeName}' not found in skeleton."); Try / catch
try { component.SetupBoneLink(); }
catch (InvalidOperationException) { /* fix NodeName or model */ } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Skeleton nodes are not sorted
- The collision object has been destroyed.
- A Gear constraint requires two rigidbodies.
- is a null.
- the Mass of a Rigidbody cannot be negative.
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/747fc842222bccbd.
Report an issue: GitHub.
Appendix: source
Thrown at sources/engine/Stride.Physics/Elements/PhysicsSkinnedComponentBase.cs:47
if (string.IsNullOrEmpty(NodeName) || Data.ModelComponent?.Skeleton == null) return;
if (!Data.BoneMatricesUpdated)
{
Vector3 position, scaling;
Quaternion rotation;
Entity.Transform.WorldMatrix.Decompose(out scaling, out rotation, out position);
var isScalingNegative = scaling.X * scaling.Y * scaling.Z < 0.0f;
Data.ModelComponent.Skeleton.NodeTransformations[0].LocalMatrix = Entity.Transform.WorldMatrix;
Data.ModelComponent.Skeleton.NodeTransformations[0].IsScalingNegative = isScalingNegative;
Data.ModelComponent.Skeleton.UpdateMatrices();
Data.BoneMatricesUpdated = true;
}
BoneIndex = Data.ModelComponent.Skeleton.Nodes.IndexOf(x => x.Name == this.NodeName);
if (BoneIndex == -1)
{
throw new InvalidOperationException("The specified NodeName doesn't exist in the model hierarchy.");
}
BoneWorldMatrixOut = BoneWorldMatrix = Data.ModelComponent.Skeleton.NodeTransformations[BoneIndex].WorldMatrix;
}
}
}
View on GitHub (pinned to 96fad776d2)