Here's how it works:
If you set the body type to dynamic yet set all fixture densities to zero, then the body's mass is forced to one and the inverse inertia is set to zero. The reason is that I want all dynamic bodies to be movable. This way I don't need redundant checks like:
if (type == b2_dynamicBody && body->GetMass() > 0.0) ....
Now prismatic joints don't work when both bodies have fixed rotation (inverse inertia is zero). I think this could be fixed, but I'm not sure if it is worth the extra code and branches.
If you set the body type to dynamic yet set all fixture densities to zero, then the body's mass is forced to one and the inverse inertia is set to zero. The reason is that I want all dynamic bodies to be movable. This way I don't need redundant checks like:
if (type == b2_dynamicBody && body->GetMass() > 0.0) ....
Now prismatic joints don't work when both bodies have fixed rotation (inverse inertia is zero). I think this could be fixed, but I'm not sure if it is worth the extra code and branches.