Provide a default density of 1.0 for Fixtures

This commit is contained in:
Bill Meltsner
2012-02-04 17:21:42 -05:00
parent e482f32da3
commit 223f9eebef
+1 -1
View File
@@ -80,7 +80,7 @@ namespace box2d
{
Body * body = luax_checkbody(L, 1);
Shape * shape = luax_checkshape(L, 2);
float density = (float)luaL_checknumber(L, 3);
float density = (float)luaL_optnumber(L, 3, 1.0f);
Fixture * fixture;
ASSERT_GUARD(fixture = instance->newFixture(body, shape, density);)
luax_newtype(L, "Fixture", PHYSICS_FIXTURE_T, (void*)fixture);