Body circleBody ... ;// having large radius //for all balls arranged in hexagon structure foreach BallBody b { WeldJointDef def = new WeldJointDef(); def.initialize(b, circleBody, b.getWorldCenter()); mPhysicsWorld.createJoint(def); }
jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd);
jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd); jd.initialize(prevBody, body, anchor); getWorld().createJoint(jd);