Class XRHandProcessingUtility
Utility methods for processing joints from a XRHand
Inherited Members
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 |
Returns
Type | Description |
---|---|
Native |
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 Try
Declaration
public static void SetAngularVelocity(this ref XRHandJoint joint, Vector3 angularVelocity)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
joint | The invoking joint for this extension method. To call this method,
call |
Vector3 | angularVelocity | The angular velocity to set for the |
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 XRHand
Declaration
public static void SetCorrespondingHand(this XRHandSubsystem subsystem, XRHand hand)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
subsystem | The invoking subsystem for this extension method. To call this method,
call |
XRHand | hand | The hand to update to on the subsystem. Must have originally been
retrieved from that XRHand |
SetLinearVelocity(ref XRHandJoint, Vector3)
Sets the velocity that can be retrieved from Try
Declaration
public static void SetLinearVelocity(this ref XRHandJoint joint, Vector3 linearVelocity)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
joint | The invoking joint for this extension method. To call this method,
call |
Vector3 | linearVelocity | The linear velocity to set for the |
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 Try
Declaration
public static void SetPose(this ref XRHandJoint joint, Pose pose)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
joint | The invoking joint for this extension method. To call this method,
call |
Pose | pose | The Pose to set for the |
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)
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 |
Pose | rootPose | The root Pose to set for the |
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.