There is something wrong with the InertiaTensors that you are setting.
Try commenting out the line there you set the tensor and you will see that the boxes and spheres will behave alot better(currently they rotate a bit weird)
Are you sure that the correct tensors are set?, Sphere for sphere and box for box?
Also, you don't need to call Updateworld, and Captureworld is only used when rendering with tweening which you don't so you can skip that too.
Try commenting out the line there you set the tensor and you will see that the boxes and spheres will behave alot better(currently they rotate a bit weird)
Are you sure that the correct tensors are set?, Sphere for sphere and box for box?
Also, you don't need to call Updateworld, and Captureworld is only used when rendering with tweening which you don't so you can skip that too.