Struct XRHandJoint
Represents a joint of an XRHand.
Namespace: UnityEngine.XR.Hands
Syntax
public struct XRHandJoint
Properties
id
The ID of this joint.
Declaration
public readonly XRHandJointID id { get; }
Property Value
| Type | Description |
|---|---|
| XRHandJointID |
trackingState
Represents which tracking data is valid.
Declaration
public readonly XRHandJointTrackingState trackingState { get; }
Property Value
| Type | Description |
|---|---|
| XRHandJointTrackingState |
Methods
ToString()
Returns a string representation of the XRHandJoint.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | String representation of the value. |
Overrides
TryGetAngularVelocity(out Vector3)
If successful, retrieves the joint angular velocity in session space (relative to the device origin at start-up).
Declaration
public bool TryGetAngularVelocity(out Vector3 angularVelocity)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | angularVelocity | Will be filled out with the tracked angular velocity of this joint
(relative to the |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if successful and the angular velocity filled out with valid tracking data, returns false otherwise. |
Remarks
To transform to world space, rotate this by the rotation of the
XROrigin.
TryGetLinearVelocity(out Vector3)
If successful, retrieves the joint linear velocity in session space,
relative to the XROrigin.
Declaration
public bool TryGetLinearVelocity(out Vector3 linearVelocity)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | linearVelocity | Will be filled out with the tracked linear velocity of this joint
(relative to the |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if successful and the velocity was filled out with valid tracking data, returns false otherwise. |
Remarks
To transform to world space, rotate this by the rotation of the
XROrigin.
TryGetPose(out Pose)
If successful, retrieves the joint's pose in session space, relative
to the XROrigin.
Declaration
public bool TryGetPose(out Pose pose)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | pose | Will be filled out with the tracked pose of this joint if successful. |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if successful and the joint pose was filled out with valid tracking data, returns false otherwise. |
Remarks
To transform to world space, use the Pose returned by
GetTransformedBy when passing a Pose
populated by the XROrigin's position and rotation.
TryGetRadius(out Single)
If successful, retrieves the joint radius.
Declaration
public bool TryGetRadius(out float radius)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | radius | Will be filled out with the tracked radius of this joint if successful. |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if successful and the radius was filled out with valid tracking data, returns false otherwise. |