setVirtualResolution(640,480) n = createSprite(0) setSpriteSize(n , 100, 100) setSpriteOffset(n, 50, 50) setSpritePhysicsOn(n, 2) createMouseJoint(n, 50, 50, 25000) 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