class TuioGestMotionEvent(MotionEvent):
def __init__(self, id, args):
super(TuioGestMotionEvent, self).__init__(id, args)
def depack(self, args):
self.is_touch = True
# In this method, implement 'unpacking' for the received
# arguments. you basically translate from TUIO args to Kivy
# MotionEvent variables. If all you receive are x and y
# values, you can do it like this:
if len(args) <= 5:
print (args)
self.sx, self.sy = args[0:2]
self.profile = ('pos', )
self.sy = 1 - self.sy
super(TuioGestMotionEvent, self).depack(args)
Inside BUILD
def build(self):
TuioMotionEventProvider.register(b'/tuio/Gest', TuioGestMotionEvent)
return Touchtracer()