Multiform objects and their mass

In all honest, except for the simplest of geometric shapes, you’ve got no hope of doing this.

Basically, you need to choose a object A of a specific area as your base, then set density for all other objects based on the equation 

density if areaA/areaB, where areaB is the “other object’s” area.

So, as long as you have the area equations for your shapes you should be golden.

Question what body shapes are you using?

  • Square (default) - Visual shape is based on image, not body geometry.
  • Circle - Even easier to work out density.
  • Shape Matches Visual Shape - Good luck on this.

The difference is minimal indeed.

But with multiform bodies? Is it enough to divide by the number of pieces?

One way to hack this is to give the shapes TWO bodies.

  1. Very low density form fitting body that matches your collision requirements.

  2. One very small circular body with a specific density, where all shapes have the same circular body radius.

Body 2 gives the majority of the mass, while body 1 is used for collisions.

Shape Matches Visual Shape… 

Maybe I have an idea but I do not know if I can talk to you

No, I don’t think so.  You should experiment however.

Your last idea is more or less mine :smiley:

A problem I don’t hear you talking about here is center of mass.  If your shapes are arbitrary, then the center of mass will be offset.  However, if you try to force ‘same’ mass, this will be complicated and may not behave as expected.

You are right.

But the user can choose from a large set of images and I would like the shape of the object not to influence its behavior

If it was possible to put a Shape Matches Visual Shape with mass 0 and joint a standard sphere could work though … right? The problem though I think it would be to make a Shape Matches Visual Shape with 0 mass

Do you mean 0 density?  You can’t set mass.

Also, you can’t have 0 density.  Very small density like 1e-9 sure, but not zero.

Setting density == 0 is the same as not setting density.

According to you is an acceptable result? Can it work? Or is it a forcing?

I don’t understand this question…

Works or doesn’t work I might be able to help with, but ‘acceptable’ versus ‘unacceptable’ is  subjective and up to you.

you are right.

I essentially wondered if it could work or create problems that I did not anticipate. But now I do some tests