Class XRCommonHandGestures
Access to common hand gesture data and callbacks.
Inherited Members
Namespace: UnityEngine.XR.Hands
Assembly: Unity.XR.Hands.dll
Syntax
public class XRCommonHandGestures
Fields
aimActivateValueUpdated
Called when the aim activate value is updated. Either the value changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.AimActivateValueUpdatedEventArgs> aimActivateValueUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.AimActivateValueUpdatedEventArgs> |
aimActivatedStateUpdated
Called when the aim activate state is updated. Either the state changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.AimActivatedStateUpdatedEventArgs> aimActivatedStateUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.AimActivatedStateUpdatedEventArgs> |
aimPoseUpdated
Called when the aim pose is updated. Either the pose changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.AimPoseUpdatedEventArgs> aimPoseUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.AimPoseUpdatedEventArgs> |
graspFirmStateUpdated
Called when the firm grasp state is updated. Either the state changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.GraspFirmStateUpdatedEventArgs> graspFirmStateUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.GraspFirmStateUpdatedEventArgs> |
graspValueUpdated
Called when the grasp value is updated. Either the value changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.GraspValueUpdatedEventArgs> graspValueUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.GraspValueUpdatedEventArgs> |
gripPoseUpdated
Called when the grip pose is updated. Either the pose changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.GripPoseUpdatedEventArgs> gripPoseUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.GripPoseUpdatedEventArgs> |
pinchPoseUpdated
Called when the pinch pose is updated. Either the pose changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.PinchPoseUpdatedEventArgs> pinchPoseUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.PinchPoseUpdatedEventArgs> |
pinchTouchedStateUpdated
Called when the pinch state is updated. Either the state changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.PinchTouchedStateUpdatedEventArgs> pinchTouchedStateUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.PinchTouchedStateUpdatedEventArgs> |
pinchValueUpdated
Called when the pinch value is updated. Either the value changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.PinchValueUpdatedEventArgs> pinchValueUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.PinchValueUpdatedEventArgs> |
pokePoseUpdated
Called when the poke pose is updated. Either the pose changed, or the ability to retrieve it changed.
Declaration
public Action<XRCommonHandGestures.PokePoseUpdatedEventArgs> pokePoseUpdated
Field Value
| Type | Description |
|---|---|
| Action<XRCommonHandGestures.PokePoseUpdatedEventArgs> |
Properties
flags
Describes the validity of data found in this XRCommonHandGesturesState.
Declaration
public XRCommonHandGesturesFlags flags { get; }
Property Value
| Type | Description |
|---|---|
| XRCommonHandGesturesFlags |
Methods
TryGetAimActivateValue(out float)
Attempts to get the aim activate value.
Declaration
public bool TryGetAimActivateValue(out float aimActivateValue)
Parameters
| Type | Name | Description |
|---|---|---|
| float | aimActivateValue | Will be filled out with the aim activate value, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |
TryGetAimActivatedState(out bool)
Attempts to get whether the aim is fully activated.
Declaration
public bool TryGetAimActivatedState(out bool isAimActivated)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isAimActivated | Will be set to |
Returns
| Type | Description |
|---|---|
| bool | Returns |
Remarks
Data to evaluate the aim activation state might not be available when you call this function.
When data is available, the function returns true and sets isAimActivated
to indicate whether the aim is fully activated. If this function returns false,
isAimActivated will be false whether or not the aim is actually activated.
TryGetAimPose(out Pose)
Attempts to get the aim pose.
Declaration
public bool TryGetAimPose(out Pose aimPose)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | aimPose | Will be filled out with the aim pose, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |
TryGetGraspFirmState(out bool)
Attempts to get whether the user is making a fist.
Declaration
public bool TryGetGraspFirmState(out bool isGraspFirm)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isGraspFirm | Will be set to |
Returns
| Type | Description |
|---|---|
| bool | Returns |
Remarks
Data to evaluate the gesture might not be available when you call this function. When data is available,
the function returns true and sets isGraspFirm to indicate
whether the user is making a fist (firm grasp). If this function returns false,
isGraspFirm will be false whether or not the user is making a fist.
TryGetGraspValue(out float)
Attempts to get the grasp value.
Declaration
public bool TryGetGraspValue(out float graspValue)
Parameters
| Type | Name | Description |
|---|---|---|
| float | graspValue | Will be filled out with the grasp value, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |
TryGetGripPose(out Pose)
Attempts to get the grip pose.
Declaration
public bool TryGetGripPose(out Pose gripPose)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | gripPose | Will be filled out with the grip pose, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |
TryGetPinchPose(out Pose)
Attempts to get the pinch pose.
Declaration
public bool TryGetPinchPose(out Pose pinchPose)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | pinchPose | Will be filled out with the pinch pose, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |
TryGetPinchTouchedState(out bool)
Attempts to get whether the hand is performing a pinch gesture.
Declaration
public bool TryGetPinchTouchedState(out bool isPinchTouched)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isPinchTouched | Will be set to |
Returns
| Type | Description |
|---|---|
| bool | Returns |
Remarks
Data to evaluate the pinch gesture might not be available when you call this function. When data is available,
the function returns true and sets isPinchTouched to indicate
whether the hand is currently pinching. If this function returns false,
isPinchTouched will be false whether or not the hand is pinching.
TryGetPinchValue(out float)
Attempts to get the pinch value.
Declaration
public bool TryGetPinchValue(out float pinchValue)
Parameters
| Type | Name | Description |
|---|---|---|
| float | pinchValue | Will be filled out with the pinch value, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |
TryGetPokePose(out Pose)
Attempts to get the poke pose.
Declaration
public bool TryGetPokePose(out Pose pokePose)
Parameters
| Type | Name | Description |
|---|---|---|
| Pose | pokePose | Will be filled out with the poke pose, if successful. |
Returns
| Type | Description |
|---|---|
| bool | Returns |