docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRHand

    Represents a hand from an XRHandSubsystem. Do not create this yourself - get hand objects from the leftHand and rightHand properties of the XRHandSubsystem.

    Namespace: UnityEngine.XR.Hands
    Syntax
    public struct XRHand
    Remarks

    See Hand tracking for a description of the hand data model and how to access the tracking data.

    Properties

    handedness

    Represents which hand this is.

    Declaration
    public readonly Handedness handedness { get; }
    Property Value
    Type Description
    Handedness

    Right, left, or invalid.

    isTracked

    Whether the subsystem is currently tracking this hand's root pose and joints.

    Declaration
    public bool isTracked { readonly get; }
    Property Value
    Type Description
    Boolean

    Indicates the tracking status as of the last hand data update.

    rootPose

    Root pose for the hand.

    Declaration
    public readonly Pose rootPose { get; }
    Property Value
    Type Description
    Pose

    Located at the wrist joint, the forward vector of the hand points in the direction of the fingers.

    Methods

    GetJoint(XRHandJointID)

    Retrieves an XRHandJoint by its ID.

    Declaration
    public XRHandJoint GetJoint(XRHandJointID id)
    Parameters
    Type Name Description
    XRHandJointID id

    ID of the required joint.

    Returns
    Type Description
    XRHandJoint

    The XRHandJoint corresponding the ID passed in.

    Remarks

    The joint data is stored in an internal native array that isn't copied if you make a shallow copy of an XRHand object. This native array is modified each time A hand update occurs. Calling this function from a copied XRHand retrieves the latest hand data, not the data from when the hand object was copied. To take a snapshot of the joint data for use later, you must copy each individual XRHandJoint object.

    ToString()

    Returns a string representation of the XRHand.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    String representation of the value.

    Overrides
    ValueType.ToString()
    Back to top Copyright © 2023 Unity Technologies
    Generated by DocFX
    on Tuesday, March 21, 2023
    Terms of use