setVirtualResolution(640,480) n = createSprite(0) setSpriteSize(n , 100, 20) setSpriteColor(n, 255, 0, 0, 255) setSpritePhysicsOn(n, 2) n2 = createSprite(0) setSpriteSize(n2 , 100, 20) setSpriteColor(n2, 0, 255, 0, 255) setSpritePosition(n2, 120, 0) setSpritePhysicsOn(n2, 2) createMouseJoint(n, 0, 10, 25000) createWeldJoint(n, n2, 100, 10, 0) setPhysicsDebugOn() repeat x = getPointerX() y = getPointerY() SetJointMouseTarget(n, x, y) drawLine(x, y, getSpriteXByOffset(n), getSpriteYByOffset(n), 255, 0, 0) sync() until getRawKeyPressed(27) = 1 end