function touchCircle:touch(event) if "began" == event.phase then self.markx = self.x self.marky = self.y elseif "moved" == event.phase then local tempx = self.markx local tempy = self.marky local x = (event.x - event.xStart) + tempx local y = (event.y - event.yStart) + tempy self.x = x self.y = y elseif "ended" == event.phase then end end
I’m using this code to drag a small circle across the screen, but if I move my finger/mouse too fast, the movement of the circle can’t keep up and the circle stops moving even though my finger is still moving. Is there a different way of doing this so that the circle keep’s up with my finger?