SOLVED - Box falling through ground

rusty
Posts: 25
Joined: Fri Sep 19, 2008 10:23 am

SOLVED - Box falling through ground

Post by rusty »

I have a large box shaped collision object as my ground object, and a smaller box attached to a rigid body which has a mass of 1200. My problem is that dropping the small box onto the ground, is not working; it's passing through the large ground box.

I've set the collision margin to be 0.5 for both boxes.

If I decrease the mass of the small box to 10, it won't fall through. But anything above that, and it's as if the constraints won't generate enough force to keep the box up. Because the box is initialiy angled around the x-axis so that one edge hits the ground first, could it be that I have set the tensor when calling setMassProps() incorrectly?

What are the possible causes of this behaviour, can anybody help?

** EDIT - SOLVED **

I inadvertantly hit on the solution while writing this post. I thought because setMassProps() is passed the mass of the body, it would adjust the tensor accordingly. But a quick look in the source tells me that this is not the case and I was bloody stupid to think that in the first place!

So taking into account for the mass when calculating the tensor is important. Maybe something that could be added to the documentation? :)