Why are the physics shaky in Unity?

I have a couple of questions concerning the physics
First of all, my gamobjects contains a rigidbody, mesh collider, configurable joint.

Basically, I have five boxes on the ground. I drag with the following script;

IEnumerator OnMouseDown() 
    {
        Vector3 screenSpace = myCamera.WorldToScreenPoint(transform.position);
        Vector3 offset = transform.position - myCamera.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenSpace.z));
	    while (Input.GetMouseButton(0))
	    {
            //if there's gameobject above the one we click make them child so that we can move then together
            CreateChildParent();
            Vector3 oldPosition = transform.position;
            Vector3 curScreenSpace = new Vector3(Input.mousePosition.x, Input.mousePosition.y, (screenSpace.z + GETInFRONT)); // getInFront is to make sure that the block stays infront.
            Vector3 curPosition = myCamera.ScreenToWorldPoint(curScreenSpace) + offset;
		    transform.position = curPosition;
            if(oldPosition != curPosition)
            {
                pieceClicked = true;
            }
            yield return null;
	    }
    }

So, of course, I can stack them. I can move part of the stack by clicking on one box and the ones above will become the childs of the clicked gameobject. Everything works fine from there. But if I move the stack of gameobjects slowly, the ones on top will start to go through each other.

Also, when I let go of the mouse, the boxe will fall on it’s intended position. If there’s a box already there, it will go and place itself on top of it. Normally, it will fall on it with little physic reaction and be stable in short, very short period of time. But once in a while, when I drop a boxe on top of other boxes, they will fly in different direction like firework??!!??? :?

This is a bit frustrating because it cause some instability for what seems simple to do. Can someone clarify this for me. I’m I missing something?.

*****You will find the gameobject that I’m using in attachment with the script.

331335–11674–$boxunityphysicissue_671.unitypackage (333 KB)

Stacking objects in a realtime physics engine is always a bit risky. I wouldn’t use convex mesh colliders either, when an approximate box would work fine for your object.

Precision/speed for a box/sphere collider will always be better than polygon to polygon collision.

Not sure why they’re not coming to “rest” and engine is stopping calculations on them tho.
If thats a problem even with just box colliders, it might be possible to make them kinematic once they stop moving, and make them dynamic again if a physics force is applied to them. Depends how many you’re considering stacking.

(couldnt play around with it - error CS0103: The name `TriggerColumn’ does not exist in the current context)

For the error thanks for the heads up.

I found out that I can add Fixed Joint in order to keep them moving properly when stacked, I will try that.

I will change the collider from mesh to box as you suggested.

thanks,