procedural mesh collider issue

Hi,

i’m having some issues updating my snake collision body, it returns a simple box shape collision, which is nothing like the snake body mesh i provided in the script, thus collision becomes somehow useless

any idea on how i can solve this

the script i’m using to assign new mesh to the collision mesh

        var meshHolder = DeformedMesh.DMBranches[0].MeshHolder;
       var mesh= meshHolder.GetComponent<MeshFilter>().mesh;

        meshHolder.GetComponent<MeshCollider>().sharedMesh = null;
        meshHolder.GetComponent<MeshCollider>().sharedMesh = mesh;

hey,
problem solved, i was doing something stupid as usual, i set collision convex to true, it should. be set to false instead