Multiple Shapes with Different Density and Gravity Rotation

Hi,

I have a simple body with two shapes. Both shapes are boxes. One shape is 2 times longer than the other. The smaller shape has significantly more density so its mass should be much bigger than that of the longer shape.

When I apply force on the body and throw it up, it falls horizontally as if both shapes have exactly the same mass. My expectation was that the body would rotate and the heavier shape would be on the bottom. This would be the expected orientation for a falling body in the real world. The heavier object should be pulled down harder by gravity.

Please let me know if this is a Box2D limitation/bug or I am missing something.

Thanks in advance.
Actually, your assumption about gravity is incorrect.

Bodies pulled down by gravity in a vacuum fall at the same rate no matter what the mass is. Heavier object does not fall faster than lighter objects.

Feathers fall slower than a bowling ball "in the real world", but this is due to air friction working as an opposite force is more noticeable on the feather than on the bowling ball. Do this same experiment in a vacuum and the feather will hit the floor at the same time as the bowling ball.

It's called the Equivalence principle

Box2D does not emulate any air friction, and if you desire such an effect you're required to apply it yourself on top of Box2D.
Yes, I am aware of the air resistance effect. I've actually done that experiment when I was in high school.

Anyway I was expecting Box2D to emulate air friction. I guess I'll try to play with different things and see if I can emulate air. Has anybody run into this before? How did you handle it?

Thanks.
I've never heard of a physics engine that implements air friction and it's usually superfluous for any real time simulations to have it. The result without it is realistic enough and the addition of it would limit the performance significantly if done to its full extent.

How ever, if it's a feature you really believe is of great significance, I'm sure it'd be possible to make a lighter, albeit less accurate, calculation for air resistance.

A "simple" way of doing it would be to use the body's velocity as a normal and check the outer most points of the shape from that. Problem would be that a wedge shape would create as much resistance as a flat surface, which is normally not the case.
Another step could be to calculate each surface from that normal and produce a result depending on the angle towards the normal and the width of the surface and apply a force to each surface and so on.

It's a lot of work and can prove very impractical so I'd advice against it.

The best way to make people think there's air friction is to make objects with a unique set of rules. Simply fake it. Arrows that correct themselves towards it's velocity's direction rather than having an actual air friction affect it in that way. Or a feather falling slower would simply have it's special case with an opposite force that other objects do not have.

Original thread: https://box2d.org/forum/viewtopic.php?t=6660