Added an optional 'collideconnected' boolean argument to love.physics.newMotorJoint (resolves issue #1130).

This commit is contained in:
Alex Szpakowski
2016-02-02 08:38:07 -04:00
parent 53795d40a6
commit ab4cfb4a35
5 changed files with 8 additions and 6 deletions
+2 -1
View File
@@ -42,7 +42,7 @@ MotorJoint::MotorJoint(Body *body1, Body *body2)
joint = (b2MotorJoint *) createJoint(&def);
}
MotorJoint::MotorJoint(Body *body1, Body *body2, float correctionFactor)
MotorJoint::MotorJoint(Body *body1, Body *body2, float correctionFactor, bool collideConnected)
: Joint(body1, body2)
, joint(NULL)
{
@@ -50,6 +50,7 @@ MotorJoint::MotorJoint(Body *body1, Body *body2, float correctionFactor)
def.Initialize(body1->body, body2->body);
def.correctionFactor = correctionFactor;
def.collideConnected = collideConnected;
joint = (b2MotorJoint *) createJoint(&def);
}