by AViefhues » Wed Apr 05, 2017 1:33 pm
Hi,
I've done this by using nodes:
take the screen x coordinate:
-> Use the delta node
-> if the delta is higher/lower a specific value -> script node swipe left /right
problem: you just want to recognize the delta while someone is continuously on the screen and not if you touch one point on the left and then one on the right side...
to prevent this just send the x coordinate to the delta node if the aircan says "active" otherwise send -1000 to the node, and then you can filter all very large deltas an only use the values inside the interesting range.
use the same way for the y coordinates
to make the system more robust and prevent collisions of up/down an left/right swipes block one direction depending on the absolute value of both deltas.
for example: If the absolute value of the x screen delta is higher than the absolute value of the y screen delta -> just look for left or right swipe.
for me this works very fine an if you want you can block the hole swipe-system by sending no values to the delta nodes. I do so while a swipe action is performed.
cheers
Alex