User Tools

Site Tools


gestures:touch:bi-manual:3-finger-tilt

3-Finger-Tilt

(Touch → Bi-Manual → Three Point Tilt “3-Finger-Tilt”)

The TILT gesture is triggered when two touch points are held stationary and the third touch point is pulled away. The change in the separation “dsx” and “dsy” is calculated and returned to the gesture dimensions “tilt_dx” and “tilt_dy” respectively.

In this example the “3-finger-tilt” gesture only* works with three touch points. Dimension values are only returned if the change in cluster separation is above minimum threshold of “0.015” pixels. If the threshold is met then the value is passed through the multiply filter. In this example the multiply filter acts to amplify the change in separation so that is becomes 100 times larger.

When amplified in this way the tilt gesture can be used to rotate an object along a user defined axis. Where the axis of rotation is controlled by the direction in which the third point moves. This gesture can then be used effectively to manipulate objects in 3D virtual space.

<Gesture id="3-finger-tilt" type="tilt">
    <match>
        <action>
            <initial>
                <cluster point_number="3" point_number_min="" point_number_max=""/>
            </initial>
        </action>
    </match>
    <analysis>
        <algorithm class="kinemetric" type="continuous">
            <library module="tilt"/>
            <variables>
                <property id="tilt_dx" return="dsx" var="dsx" var_min="0.015"/>
                <property id="tilt_dy" return="dsy" var="dsy" var_min="0.015"/>
            </variables>
            <returns>
                <property id="tilt_dx" result="dsx"/>
                <property id="tilt_dy" result="dsy"/>
            </returns>
        </algorithm>
    </analysis>
    <processing>
        <multiply_filter>
            <property ref="tilt_dx" active="true" factor="100"/>
            <property ref="tilt_dy" active="true" factor="100"/>
        </multiply_filter>
    </processing>
    <mapping>
        <update dispatch_type="continuous">
            <gesture_event  type="tilt">
                <property ref="tilt_dx" target=""/>
                <property ref="tilt_dy" target=""/>
            </gesture_event>
        </update>
    </mapping>
</Gesture>

The “3-finger-tilt” gesture only works with three fingers but technically the gesture action can easily be performed with 2 or mode touch points.

gestures/touch/bi-manual/3-finger-tilt.txt · Last modified: 2015/09/15 12:51 by glass