mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Added an optional 'collideconnected' boolean argument to love.physics.newMotorJoint (resolves issue #1130).
This commit is contained in:
@@ -419,8 +419,9 @@ int w_newMotorJoint(lua_State *L)
|
||||
if (!lua_isnoneornil(L, 3))
|
||||
{
|
||||
float correctionFactor = (float)luaL_checknumber(L, 3);
|
||||
bool collideConnected = luax_optboolean(L, 4, false);
|
||||
luax_catchexcept(L, [&]() {
|
||||
j = instance()->newMotorJoint(body1, body2, correctionFactor);
|
||||
j = instance()->newMotorJoint(body1, body2, correctionFactor, collideConnected);
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user