# ridgid bodies of different mass

I am working on a script that allows the user to assemble structures by putting together rigid bodies using fixed joints created in game, in order to create larger structures. I was having problems, and it seemed that some things made with this script would act completely erratically and the rigid bodies would basically spasm until they broke the fixed joint holding them in place.

Then I realized the root of my problem, if two rigid bodies are joined with a fixed joint, and they have significantly different masses (2:1 or more) they do not attach as expected, and usually the lighter one will begin to violently shake around the heavier object. The temporary solution is just to make all the objects the same weight, but if they don’t have masses based on their size, the physics will be very unrealistic. Any suggestions?

Try isKinematic. here is the link to the scripting refence to give you a better idea about it.

well, it seems to happen regardless of their orientation.

In the real world, the ability of one object to support another has nothing to do with mass, but rather with compressive strength. So yes, it is supposed to work like that.,

which should be what you were after.

On a different note:

It would be helpful to start a conversation on the topic and build a proper answer. I’m still trying to understand how they should be used, the documentation skips on some details:

Assuming RB1 with mass 2 has a FixedJoint with connected body RB2 with mass 20:

1. If massScale = 2, does is act on RB1’s mass (2 x 2 = 4), or is the joint always seeing RB1s mass as 1, and would now see it as 1 x 2 = 2?

2. Probably another way to ask #1 but, should we set the massScale and inverseMassScale to reflect the bodies’ mass difference (1:10), or is it an extra scaling, on top of their current difference? If so:

3. What would be the difference between (massScale = 1, inverseMassScale = 10) and (massScale = 2, inverseMassScale = 20), and why do we need both?

4. What does “scaling mass and inertia is fundamentally nonphysical and momentum won’t be conserved” actually mean and what does it imply?

5. What exactly is “inverse mass” and “inertia tensor” in the first sentence “The scale to apply to the inverse mass and inertia tensor of the body prior to solving the constraints”. It’s the same for both massScale and connectedMassScale. Copypaste mistake? “inverse mass” is the mass of the connected body I presume.

@randosity did you find your way? Cheers.