User Tools

Site Tools



The following GML example describes a single finger drag using a pointing pose:

<Gesture id="1_finger_point_drag" type="drag">
                <cluster mode="motion" device="leap_motion" type="finger" point_number="1"/>
                <hand side="left" orientation="down">
                    <index extension="1"/>
                    <middle extension="0"/>
                    <ring extension="0"/>
                    <pinky extension="0"/>
                    <thumb extension="0"/>
       <algorithm class="kinemetric" type="continuous">
            <library module="drag"/>
                <property id="drag_dx" result="dx"/>
                <property id="drag_dy" result="dy"/>
                <property id="drag_dz" result="dz"/>
        <update dispatch_type="continuous">
            <gesture_event type="drag">
                <property ref="drag_dx" target="x"/>
                <property ref="drag_dy" target="y"/>
                <property ref="drag_dz" target="z"/>

In this example once the index finger reaches an extension value approaching 1 a virtual interaction point is created and passed to the display object hit test manager. This point can then cluster on the display object and be subject to kinemetric analysis to create a gesture event.

gestures/motion/gesture_index/hand/1_finger_point_drag.txt · Last modified: 2019/01/29 19:06 (external edit)