mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Provide a default density of 1.0 for Fixtures
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user