I’m trying to rewrite it using classes, as I need to have several draggable objects in my project (I’m creating an image tagging tool for a computer vision project).
However, my sketch behaves very strangely and I can’t identify the problem.
The dragging works for the first few drags, then it stops working, then sometimes it works again.
When I do shorter drags is seems to work better and for a bit longer
It’s a very random behaviour and I can’t figure out where is the problem.