docs.unity3d.com
    Show / Hide Table of Contents

    Class XRHandProviderUtility

    Utility methods for a provider to a XRHandSubsystem.

    Inheritance
    Object
    XRHandProviderUtility
    Namespace: UnityEngine.XR.Hands.ProviderImplementation
    Syntax
    public static class XRHandProviderUtility

    Methods

    CreateJoint(Handedness, XRHandJointTrackingState, XRHandJointID, Pose, Single, Vector3, Vector3)

    Create a fully configurable joint with at least a pose in hand space, tracking state, and ID.

    Declaration
    public static XRHandJoint CreateJoint(Handedness handedness, XRHandJointTrackingState trackingState, XRHandJointID id, Pose pose, float radius = 0F, Vector3 linearVelocity = default(Vector3), Vector3 angularVelocity = default(Vector3))
    Parameters
    Type Name Description
    Handedness handedness

    Denotes whether the joint being created is on the left or right hand.

    XRHandJointTrackingState trackingState

    The tracking state flags associated with this joint, representing which fields of the XRHandJoint are valid.

    XRHandJointID id

    The XRHandJointID of the joint. When filling out an element of an array of XRHandJoint, the index must be converted with FromIndex(Int32).

    Pose pose

    The pose of the joint in session space, relative to the XROrigin.

    Single radius

    The radius of the joint. The default value is 0f.

    Vector3 linearVelocity

    The linear velocity of the joint in hand space (relative to the XROrigin). The default value is Vector3.zero.

    Vector3 angularVelocity

    The angular velocity of the joint in hand space (relative to the XROrigin). The default value is Vector3.zero.

    Returns
    Type Description
    XRHandJoint

    An XRHandJoint with the given pose and other supplied data.

    CreateJoint(XRHandJointTrackingState, XRHandJointID, Pose, Single, Vector3, Vector3)

    Create a fully configurable joint with at least a pose in hand space, tracking state, and ID.

    Declaration
    [Obsolete("Use the CreateJoint overload that has an additional first argument for handedness. Otherwise, joints will always report as being from the left hand, even if they were from the right hand.")]
    public static XRHandJoint CreateJoint(XRHandJointTrackingState trackingState, XRHandJointID id, Pose pose, float radius = 0F, Vector3 linearVelocity = default(Vector3), Vector3 angularVelocity = default(Vector3))
    Parameters
    Type Name Description
    XRHandJointTrackingState trackingState

    The tracking state flags associated with this joint, representing which fields of the XRHandJoint are valid.

    XRHandJointID id

    The XRHandJointID of the joint. When filling out an element of an array of XRHandJoint, the index must be converted with FromIndex(Int32).

    Pose pose

    The pose of the joint in session space, relative to the XROrigin.

    Single radius

    The radius of the joint. The default value is 0f.

    Vector3 linearVelocity

    The linear velocity of the joint in hand space (relative to the XROrigin). The default value is Vector3.zero.

    Vector3 angularVelocity

    The angular velocity of the joint in hand space (relative to the XROrigin). The default value is Vector3.zero.

    Returns
    Type Description
    XRHandJoint

    An XRHandJoint with the given pose and other supplied data.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023