docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRFingerShapeCondition

    A set of targets for the XRFingerShape values of a single XRHandFingerID.

    Inheritance
    object
    XRFingerShapeCondition
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.Hands.Gestures
    Assembly: Unity.XR.Hands.dll
    Syntax
    [Serializable]
    public class XRFingerShapeCondition

    Properties

    fingerID

    The finger ID that this condition applies to.

    Declaration
    public XRHandFingerID fingerID { get; set; }
    Property Value
    Type Description
    XRHandFingerID

    targets

    Finger shape targets to check for this finger. Setting this value will update the XRFingerShapeTypes needed for this condition.

    Declaration
    public XRFingerShapeCondition.Target[] targets { get; set; }
    Property Value
    Type Description
    Target[]

    Methods

    CheckCondition(XRHandJointsUpdatedEventArgs)

    Checks if the XRFingerShape matches the targets in this condition.

    Declaration
    public bool CheckCondition(XRHandJointsUpdatedEventArgs eventArgs)
    Parameters
    Type Name Description
    XRHandJointsUpdatedEventArgs eventArgs

    The hand joint updated event argument that contains the latest hand data.

    Returns
    Type Description
    bool

    Returns true if all the finger shape conditions are met. Otherwise, returns false.

    Remarks

    The target values are checked in the order listed. The method will return false as soon as it finds one value that is different from the target by more than the tolerance.

    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)