protected static CollisionFilter ProduceCollisionFilter(LegacyCollider collider)
        {
            var layer  = collider.gameObject.layer;
            var filter = new CollisionFilter {
                CategoryBits = (uint)(1 << collider.gameObject.layer)
            };

            for (var i = 0; i < 32; ++i)
            {
                filter.MaskBits |= (uint)(LegacyPhysics.GetIgnoreLayerCollision(layer, i) ? 0 : 1 << i);
            }
            return(filter);
        }