Class XRHandProviderUtility
Utility methods for a provider to a XRHand
Inherited Members
Namespace: UnityEngine .XR.Hands.ProviderImplementation
Assembly: Unity.XR.Hands.dll
Syntax
public static class XRHandProviderUtility
Methods
CreateJoint(Handedness, XRHandJointTrackingState, XRHandJointID, Pose, float, 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 = 0, Vector3 linearVelocity = default, Vector3 angularVelocity = default)
Parameters
Type | Name | Description |
---|---|---|
Handedness | handedness | Denotes whether the joint being created is on the left or right hand. |
XRHand |
trackingState | The tracking state flags associated with this joint, representing
which fields of the XRHand |
XRHand |
id | The XRHand |
Pose | pose | The pose of the joint in session space, relative to the XROrigin. |
float | radius | The radius of the joint. The default value is |
Vector3 | linearVelocity | The linear velocity of the joint in hand space (relative to the
XROrigin). The default value is
|
Vector3 | angularVelocity | The angular velocity of the joint in hand space (relative to the
XROrigin). The default value is
|
Returns
Type | Description |
---|---|
XRHand |
An XRHand |
CreateJoint(XRHandJointTrackingState, XRHandJointID, Pose, float, 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 = 0, Vector3 linearVelocity = default, Vector3 angularVelocity = default)
Parameters
Type | Name | Description |
---|---|---|
XRHand |
trackingState | The tracking state flags associated with this joint, representing
which fields of the XRHand |
XRHand |
id | The XRHand |
Pose | pose | The pose of the joint in session space, relative to the XROrigin. |
float | radius | The radius of the joint. The default value is |
Vector3 | linearVelocity | The linear velocity of the joint in hand space (relative to the
XROrigin). The default value is
|
Vector3 | angularVelocity | The angular velocity of the joint in hand space (relative to the
XROrigin). The default value is
|
Returns
Type | Description |
---|---|
XRHand |
An XRHand |