I want to limit the dragging of an object to a certain amount of pixel like you can't drag and drop an object for more than 100 pixel. how would you do that?
Develop games in your browser. Powerful, performant & highly capable.
On Click: Store the current X/Y
then every tick calculate the distance between x2,y2 and the original X,Y (using pythagorean theorem).
if c > 100, stop dragging