Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var weldJoint = new SymbolicConstraint("
- body b1
- body b2
- vector anchor1
- vector anchor2
- scalar phase
- let r1 = relative b1.rot anchor1 in
- let r2 = relative b2.rot anchor2 in
- { (b2.pos + r2) - (b1.pos + r1)
- b2.rot - b1.rot - phase }
- ");
- weldJoint.setBody("b1", ...);
- weldJoint.setBody("b2", ...);
- weldJoint.setVector("anchor1", new Vec2(...));
- weldJoint.setVector("anchor2", new Vec2(...));
- weldJoint.setScalar("phase", ...);
- weldJoint.space = space;
- trace(weldJoint.debug());
Advertisement
Add Comment
Please, Sign In to add comment