We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b580f49 commit 18265ddCopy full SHA for 18265dd
cocos2d/CCPhysicsJoint.m
@@ -96,6 +96,8 @@ -(void)willAddToPhysicsNode:(CCPhysicsNode *)physics
96
CGPoint anchorA = CGPointApplyAffineTransform(_anchorA, bodyA.node.nonRigidTransform);
97
CGPoint anchorB = CGPointApplyAffineTransform(_anchorB, bodyB.node.nonRigidTransform);
98
99
+ _constraint.anchorA = CCP_TO_CPV(anchorA);
100
+ _constraint.anchorB = CCP_TO_CPV(anchorB);
101
_constraint.dist = cpvdist([bodyA.body localToWorld:CCP_TO_CPV(anchorA)], [bodyB.body localToWorld:CCP_TO_CPV(anchorB)]);
102
}
103
0 commit comments