Simple Questins! I Think ;P

Hey guys, i use for some time the APE but i want to use Box2D now!

I make some hello worlds, an all is good at now!

But i have some questions:

if i create one object with mass = 0;

And with some event i want to set a new mass to this object, to this become influencied by Gravity, how i do that?
If i simple use:

var newMass:b2MassData = new b2MassData();
newMass.mass = 1.0;
bb.SetMass(newMass);

The object now have a Mass, but this not rotate anymore! :S
I believe that after you change the mass of a body, you need to re-call bb.GetMassFromShapes(). Try that, and see if it works...
b2MassData has three fields, you need to set all of them. If you leave I, angular inertia, at 0, you get that rotationless effect.

SetMassFromShapes is a convient way of setting mass, replacing using SetMass. It works from the density of the shapes, and always gives the correct value for angular inertia.
this is really interesting. so if i wanted to make an object that could not rotate under any circumstances. what would i do?
Well, you could do exactly that. But it's generally easier to use fixedRotation.

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