mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Forgot to put the second anchor points in local coordinates
--HG-- branch : box2d-update
This commit is contained in:
@@ -38,7 +38,7 @@ namespace box2d
|
||||
{
|
||||
b2FrictionJointDef def;
|
||||
def.Initialize(body1->body, body2->body, Physics::scaleDown(b2Vec2(xA,yA)));
|
||||
def.localAnchorB = Physics::scaleDown(b2Vec2(xB, yB));
|
||||
def.localAnchorB = body2->body->GetLocalPoint(Physics::scaleDown(b2Vec2(xB, yB)));
|
||||
def.collideConnected = collideConnected;
|
||||
joint = (b2FrictionJoint*)createJoint(&def);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace box2d
|
||||
{
|
||||
b2WeldJointDef def;
|
||||
def.Initialize(body1->body, body2->body, Physics::scaleDown(b2Vec2(xA,yA)));
|
||||
def.localAnchorB = Physics::scaleDown(b2Vec2(xB, yB));
|
||||
def.localAnchorB = body2->body->GetLocalPoint(Physics::scaleDown(b2Vec2(xB, yB)));
|
||||
def.collideConnected = collideConnected;
|
||||
joint = (b2WeldJoint*)createJoint(&def);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user