docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRHandProcessingUtility

    Utility methods for processing joints from a XRHandSubsystem.

    Inheritance
    object
    XRHandProcessingUtility
    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.Processing
    Assembly: Unity.XR.Hands.dll
    Syntax
    public static class XRHandProcessingUtility

    Methods

    GetRawJointArray(XRHand)

    Gets the NativeArray of XRHandJoints contained in the invoking hand.

    Declaration
    public static NativeArray<XRHandJoint> GetRawJointArray(this XRHand hand)
    Parameters
    Type Name Description
    XRHand hand

    The invoking hand for this extension method. To call this method, call .GetRawJointArray() on an XRHand.

    Returns
    Type Description
    NativeArray<XRHandJoint>

    The raw joint array contained in the supplied hand.

    Remarks

    After manipulating data for a particular joint, be sure to assign it back to the array you got it from, as you can only manipulate copies of objects from a NativeArray.

    SetAngularVelocity(ref XRHandJoint, Vector3)

    Sets the velocity that can be retrieved from TryGetAngularVelocity(out Vector3) and sets the flag for that data to be valid.

    Declaration
    public static void SetAngularVelocity(this ref XRHandJoint joint, Vector3 angularVelocity)
    Parameters
    Type Name Description
    XRHandJoint joint

    The invoking joint for this extension method. To call this method, call .SetAngularVelocity(modifiedVelocity) on an XRHandJoint.

    Vector3 angularVelocity

    The angular velocity to set for the joint.

    Remarks

    After manipulating data for a particular joint, be sure to assign it back to the array you got it from, as you can only manipulate copies of objects from a NativeArray.

    SetCorrespondingHand(XRHandSubsystem, XRHand)

    Sets the subsystem's hand corresponding to hand passed in, which must have been initially retrieved from the XRHandSubsystem's leftHand or rightHand property.

    Declaration
    public static void SetCorrespondingHand(this XRHandSubsystem subsystem, XRHand hand)
    Parameters
    Type Name Description
    XRHandSubsystem subsystem

    The invoking subsystem for this extension method. To call this method, call .SetCorrespondingHand() on an XRHandSubsystem.

    XRHand hand

    The hand to update to on the subsystem. Must have originally been retrieved from that XRHandSubsystem

    SetLinearVelocity(ref XRHandJoint, Vector3)

    Sets the velocity that can be retrieved from TryGetLinearVelocity(out Vector3) and sets the flag for that data to be valid.

    Declaration
    public static void SetLinearVelocity(this ref XRHandJoint joint, Vector3 linearVelocity)
    Parameters
    Type Name Description
    XRHandJoint joint

    The invoking joint for this extension method. To call this method, call .SetLinearVelocity(modifiedVelocity) on an XRHandJoint.

    Vector3 linearVelocity

    The linear velocity to set for the joint.

    Remarks

    After manipulating data for a particular joint, be sure to assign it back to the array you got it from, as you can only manipulate copies of objects from a NativeArray.

    SetPose(ref XRHandJoint, Pose)

    Sets the pose that can be retrieved from TryGetPose(out Pose) and sets the flag for that pose to be valid.

    Declaration
    public static void SetPose(this ref XRHandJoint joint, Pose pose)
    Parameters
    Type Name Description
    XRHandJoint joint

    The invoking joint for this extension method. To call this method, call .SetPose(modifiedPose) on an XRHandJoint.

    Pose pose

    The Pose to set for the joint.

    Remarks

    After manipulating data for a particular joint, be sure to assign it back to the array you got it from, as you can only manipulate copies of objects from a NativeArray.

    SetRootPose(ref XRHand, Pose)

    Sets the rootPose of the invoking XRHand.

    Declaration
    public static void SetRootPose(this ref XRHand hand, Pose rootPose)
    Parameters
    Type Name Description
    XRHand hand

    The invoking hand for this extension method. To call this method, call .SetRootPose(modifiedRootPose) on an XRHand.

    Pose rootPose

    The root Pose to set for the hand.

    Remarks

    Be sure to follow this with a call to yourHandSubsystem.SetCorrespondingHand(modifiedHand), or you will only update the root pose of a copy of a hand.

    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)