{"record":{"id":"e43cf61aec7e73fd","repo":"stride3d/stride","slug":"collider-type-collider-gettype-is-missing-in-nameof","errorCode":null,"errorMessage":"Collider type {collider.GetType()} is missing in {nameof(GetLocalTransforms)}, please fill an issue or fix it","messagePattern":"Collider type (.+?) is missing in (.+?), please fill an issue or fix it","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.BepuPhysics/Stride.BepuPhysics/Definitions/Colliders/CompoundCollider.cs","lineNumber":63,"sourceCode":"        _colliders = new() { Owner = this };\n    }\n\n    public void GetLocalTransforms(CollidableComponent collidable, Span<ShapeTransform> transforms)\n    {\n        for (int i = 0; i < _colliders.Count; i++)\n        {\n            var collider = _colliders[i];\n            transforms[i].PositionLocal = collider.PositionLocal;\n            transforms[i].RotationLocal = collider.RotationLocal;\n            transforms[i].Scale = collider switch\n            {\n                BoxCollider box => box.Size,\n                CapsuleCollider cap => Vector3.One,\n                CylinderCollider cyl => new(cyl.Radius, cyl.Length, cyl.Radius),\n                SphereCollider sph => new(sph.Radius),\n                TriangleCollider tri => Vector3.One,\n                ConvexHullCollider convex => Vector3.One,\n                _ => throw new NotImplementedException($\"Collider type {collider.GetType()} is missing in {nameof(GetLocalTransforms)}, please fill an issue or fix it\"),\n            };\n        }\n    }\n\n    bool ICollider.TryAttach(Shapes shapes, BufferPool pool, ShapeCacheSystem shapeCache, bool shouldCalculateInertia, out TypedIndex index, out Vector3 centerOfMass, out BodyInertia inertia)\n    {\n        if (_colliders.Count == 0)\n        {\n            index = default;\n            centerOfMass = default;\n            inertia = default;\n            return false;\n        }\n\n        var compoundBuilder = new CompoundBuilder(pool, shapes, _colliders.Count);\n        try\n        {\n            foreach (var collider in _colliders)","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.BepuPhysics/Stride.BepuPhysics/Definitions/Colliders/CompoundCollider.cs#L45-L81","documentation":"CompoundCollider.GetLocalTransforms switches over known collider kinds (box, capsule, cylinder, sphere, triangle, convex hull) to build per-child shape data; any other collider type hits the default case and throws NotImplementedException. This indicates a collider type was added to the library without updating compound-shape handling — an internal coverage gap.","triggerScenarios":"Building a CompoundCollider whose Children list contains a collider type not handled by the switch (e.g. a new/custom ICollider implementation, or a newer Stride collider type used with an older Stride.BepuPhysics build).","commonSituations":"Using a custom collider subclass with compounds, upgrading Stride so new collider types exist but the physics plugin is stale, or mistakenly placing a non-convex/non-supported collider into a compound.","solutions":["Replace the unsupported child collider with a supported type (Box, Sphere, Capsule, Cylinder, Triangle, ConvexHull).","Update Stride.BepuPhysics / Stride to matching versions so all built-in collider types are handled.","If it's your custom collider, extend CompoundCollider.GetLocalTransforms (or file/fix the issue as the message says)."],"exampleFix":"// before\ncompound.Children.Add(myCustomCollider); // unhandled type\n// after\ncompound.Children.Add(new ConvexHullCollider(myCustomCollider.Points)); // supported type","handlingStrategy":"validation","validationCode":"static readonly HashSet<Type> Supported = new() { typeof(BoxCollider), typeof(SphereCollider), typeof(CapsuleCollider), typeof(CylinderCollider), typeof(TriangleCollider), typeof(ConvexHullCollider) };\nif (children.Any(c => !Supported.Contains(c.GetType()))) throw new InvalidOperationException(\"Compound contains unsupported collider type\");","typeGuard":null,"tryCatchPattern":"try { var compound = BuildCompound(children); } catch (NotImplementedException ex) { log.Error(\"Unsupported collider in compound\", ex); /* rebuild with supported types */ }","preventionTips":["Only add built-in supported collider types to compounds","Keep Stride and Stride.BepuPhysics versions in sync","Check for library updates if new collider types were added upstream"],"tags":["physics","collider","unsupported","internal"],"backgroundTag":"method-not-implemented","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}