I'm using the UIPinchRecognizer and an open pinch to detect when someone 'pulls apart' a sprite in a Box2D world.
The problem is that when you drag two items toward each other it detects this as a close pinch and breaks all my touchjoints and the movement of the box2d objects.
I've tried to split my problem into two questions - the question you're reading now: is it is possible to suppress the close pinch, and if that's not possible: how to detect an open pinch myself.
I need to either suppress the detection of close pinches or write my own open pinch detection.
I tried returning from the pinch gesture method on an open pinch like this:
if (pinch.velocity < 0) {
//close pinch
return;
}
but it doesn't work because it still breaks the touch joints / box2d objects.
Could you help me solve this problem by suppressing the detection of close pinches?