Forgot to put the second anchor points in local coordinates

--HG--
branch : box2d-update
This commit is contained in:
Bill Meltsner
2011-10-02 10:28:37 -04:00
parent f38655a934
commit 705fa14736
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}