Skip to content

Instantly share code, notes, and snippets.

@incompl
Created November 28, 2012 19:49
Show Gist options
  • Save incompl/4163655 to your computer and use it in GitHub Desktop.
Save incompl/4163655 to your computer and use it in GitHub Desktop.
body1 = new Body(physics, { color:"red", x: 15, y: 12 }).body;
body2 = new Body(physics, { image: img, x: 25, y: 12 }).body;
def = new Box2D.Dynamics.Joints.b2PulleyJointDef();
def.Initialize(body1, body2,
new b2Vec2(13,0),
new b2Vec2(25,0),
body1.GetWorldCenter(),
body2.GetWorldCenter(),
1);
var joint = world.CreateJoint(def);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment