docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Gesture building blocks

    You can define custom gestures using a set of building blocks:

    Building block Description
    Joint data The positions and orientations of the joints and bones of a hand are the most fundamental building block of a gesture. The gesture recognizer reads this data automatically. You do not need to reference individual joints when defining a custom gesture. Instead, you specify the aspects of the desired finger shape.
    Finger shape The overall shape of a finger. Finger shape is abstracted into five aspects that you can specify individually:
    • Full Curl: the overall curve of the finger
    • Base Curl: the bend of the first knuckle
    • Tip Curl: the curve of the outer bones of the finger (not including the first knuckle, unless the finger is a thumb)
    • Pinch: how close the finger is to pinching the thumb
    • Spread: the splay angle between adjacent fingers
    For example, the Full Curl value rates how curved the entire finger must be to perform the gesture, while the Base Curl value rates just the bend of the Metacarpophalangeal (MCP) joint. For a gesture to be recognized, the user's hand must be positioned to match the specified shapes of all referenced fingers within the required tolerance settings.

    You define shape values and tolerances for one or more fingers in a Hand Shape asset.
    Orientation The orientation of the hand compared to one or more selected reference directions. For example, you can specify that the user's hand be faced toward or away from the user by setting the required orientation properties.

    You can add one or more orientation conditions to Hand Pose assets and Static Hand Gesture components.
    Hand shape Defined by the shape values of one or more fingers. For example, the "Spock" hand shape could be defined by setting the necessary Full Curl and Spread values of each finger.

    Add a Hand Shape asset to your project with the menu: Assets > Create > XR > Hand Interactions > Hand Shape.
    Hand pose A Hand Shape combined with an orientation. For example, an open hand facing the user is a different pose than the same hand shape turned away from the user.

    Add a Hand Pose asset to your project with the menu: Assets > Create > XR > Hand Interactions > Hand Pose.
    Static Hand Gesture component The component you add to every scene in which you want a specific gesture to be detected. This component references either a Hand Shape or a Hand Pose asset to define how the user's hand must be held to trigger the gesture. You can also specify additional, target-relative Orientation conditions in this component.

    Refer to Add a custom gesture to a scene for instructions on defining a custom gesture and adding it to a scene.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)