remove scaling for density.

while technically density is (according to the Box2D docs) in kg/m^2, it seems like a number that can be safely left un-scaled, for simplicity's sake; the concept of a shape/fixture's density seems sufficiently divorced from the MKS system as to render this a non-issue. if this proves to be a problem in use, scaling can be re-added.
This commit is contained in:
Bill Meltsner
2012-02-04 18:26:43 -05:00
parent f3d770e5e7
commit dac757b688
+2 -2
View File
@@ -134,14 +134,14 @@ namespace box2d
int Shape::computeMass(lua_State * L) const
{
float density = Physics::scaleDown((float)luaL_checknumber(L, 1));
float density = (float)luaL_checknumber(L, 1);
b2MassData data;
shape->ComputeMass(&data, density);
b2Vec2 center = Physics::scaleUp(data.center);
lua_pushnumber(L, center.x);
lua_pushnumber(L, center.y);
lua_pushnumber(L, data.mass);
lua_pushnumber(L, data.I);
lua_pushnumber(L, Physics::scaleUp(Physics::scaleUp(data.I)));
return 4;
}