- Home /
How do I swipe on a texture and know if its swiped 100%
How can I drag and swipe upon a texture and calculate if I swiped on it 100% or certain other >100 value?
This question is a little unclear. I recommend you rephrase it slightly. What do you mean "swipe 100%"?
sorry, I don't think my last comment got posted. @CHPederson , I mean that, for example, I swipe my finger on a texture on the screen, how do I calculate whether I have swiped all over the full area (or resolution) of the texture, or not? Like, if its a 256X256 texture and I swipe finger on a certain area which is 128X128, so it should give that I have swiped over 50% of it.
Answer by Berenger · Feb 03, 2014 at 01:37 PM
Try to divide the distance between the touch and the current finger by the distance you need to swipe.
In your case, 128 / 256 = 0.5