public static WeldJoint CreateWeldJoint(World world, Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB) { WeldJoint weldJoint = new WeldJoint(bodyA, bodyB, localAnchorA, localAnchorB); world.AddJoint(weldJoint); return weldJoint; }
/// <summary> /// Creates a weld joint /// </summary> /// <param name="bodyA"></param> /// <param name="bodyB"></param> /// <param name="localAnchor"></param> /// <returns></returns> public static WeldJoint CreateWeldJoint(Body bodyA, Body bodyB, Vector2 localAnchor) { WeldJoint joint = new WeldJoint(bodyA, bodyB, bodyA.GetLocalPoint(localAnchor), bodyB.GetLocalPoint(localAnchor)); return joint; }