mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fix RopeJoints not working.
This commit is contained in:
@@ -38,7 +38,7 @@ RopeJoint::RopeJoint(Body *body1, Body *body2, float x1, float y1, float x2, flo
|
||||
: Joint(body1, body2)
|
||||
, joint(NULL)
|
||||
{
|
||||
b2RopeJointDef def;
|
||||
b2DistanceJointDef def;
|
||||
def.bodyA = body1->body;
|
||||
def.bodyB = body2->body;
|
||||
body1->getLocalPoint(x1, y1, x1, y1);
|
||||
@@ -49,7 +49,7 @@ RopeJoint::RopeJoint(Body *body1, Body *body2, float x1, float y1, float x2, flo
|
||||
def.localAnchorB.y = Physics::scaleDown(y2);
|
||||
def.maxLength = Physics::scaleDown(maxLength);
|
||||
def.collideConnected = collideConnected;
|
||||
joint = (b2RopeJoint *)createJoint(&def);
|
||||
joint = (b2DistanceJoint *)createJoint(&def);
|
||||
}
|
||||
|
||||
RopeJoint::~RopeJoint()
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
|
||||
private:
|
||||
// The Box2D RopeJoint object.
|
||||
b2RopeJoint *joint;
|
||||
b2DistanceJoint *joint;
|
||||
};
|
||||
|
||||
} // box2d
|
||||
|
||||
Reference in New Issue
Block a user