API reference
API reference
Select your platform
No SDKs available
No versions available

OVRHand Class

The OVRHand class provides hand related data which can be used by other classes such as the OVRSkeleton, the OVRMesh or the OVRSkeletonRenderer.
For example, it can detect whether a given finger is currently pinching, the pinch’s strength, and the confidence level of a finger pose.

Member Enumerations

Enumeration Hand

This enum dictates if a hand is a left or right hand.
It's used in many scenarios such as choosing which hand mesh to return to OVRMesh, which skeleton to return, etc.
None
= OVRPlugin.Hand.None
HandLeft
= OVRPlugin.Hand.HandLeft
HandRight
= OVRPlugin.Hand.HandRight

Enumeration HandFinger

This enum is used for clarifying which finger you are currently working with or need data on.
For example, you can pass "HandFinger.Ring" to GetFingerIsPinching(HandFinger) to check if the ring finger is pinching.
Thumb
= OVRPlugin.HandFinger.Thumb
Index
= OVRPlugin.HandFinger.Index
Middle
= OVRPlugin.HandFinger.Middle
Ring
= OVRPlugin.HandFinger.Ring
Pinky
= OVRPlugin.HandFinger.Pinky
Max
= OVRPlugin.HandFinger.Max

Enumeration TrackingConfidence

This enum refers to the level of confidence of a pose.
For an example of how this can be used, see method GetFingerConfidence(HandFinger)
Low
= OVRPlugin.TrackingConfidence.Low
High
= OVRPlugin.TrackingConfidence.High

Enumeration MicrogestureType

Enumerates the types of microgestures that can be recognized by the hand tracking system.
Each microgesture corresponds to a specific hand movement or gesture recognized by the system.
NoGesture
= OVRPlugin.MicrogestureType.NoGesture
SwipeLeft
= OVRPlugin.MicrogestureType.SwipeLeft
SwipeRight
= OVRPlugin.MicrogestureType.SwipeRight
SwipeForward
= OVRPlugin.MicrogestureType.SwipeForward
SwipeBackward
= OVRPlugin.MicrogestureType.SwipeBackward
ThumbTap
= OVRPlugin.MicrogestureType.ThumbTap
Invalid
= OVRPlugin.MicrogestureType.Invalid

Fields

Determines if the controller should be hidden based on held state.
An optional component for provind shell like ray functionality - highlighting where you're selecting in the UI and responding to pinches / button presses.

Properties

static OVRHandSkeletonVersion GlobalHandSkeletonVersion[Get]
True when the data received from this hand is valid.
Data can be invalid for different reasons. For example, the OVRPlugin might not have finished initializing.
True when there is high confidence on the data being provided.
True when the hand is being tracked.
If this is false, the OVRPlugin might not have finished initializing, or hand tracking was lost.
True when a system gesture is in progress.
A system gesture is a reserved gesture that allows users to transition to the Meta Quest universal menu. This behavior occurs when users place their dominant hand up with the palm facing the user and pinch with their index finger.
True when the PointerPose is valid.
The PointerPose may or may not be valid, depending on the user’s hand position, tracking status, and other factors.
The pointer pose determines the direction that the user is pointing in.
It indicates the starting point and position of the pointing ray in the tracking space. It's useful for things like UI interactions where the user pinches to click on something.
float HandScale[Get]
The level of confidence of the data being provided about this hand.
True when this hand is the same type (left/right) as the user's dominant hand.

Member Functions

Returns true if the given HandFinger is currently pinching.
If the hand data overall is not valid, it will return false. This method only returns true or false, if you want more information on how much the user has pinched, try GetFingerPinchStrength(HandFinger).
Parameters
finger
The finger you want to test, for example Middle, Index, Pinky, etc.
Returns the strength of the user's pinch.
The value it returns ranges from 0 to 1, where 0 indicates no pinch and 1 is a full pinch with the finger touching the thumb. Based on the values returned, you can provide feedback to the user by changing the color of the fingertip, adding an audible pop when fingers have fully pinched, or integrate physics interactions based on the pinch status.
Parameters
finger
The finger you want to test, for example Middle, Index, Pinky, etc.
Returns the confidence of a finger's pose as low or high, which indicates the amount of confidence that the tracking system has for the finger pose.
Parameters
finger
The finger you want to test, for example Middle, Index, Pinky, etc.
Retrieves the current microgesture type based on the hand tracking state.
Returns the current type of microgesture being performed by the hand. If the hand tracking state is not valid, it returns MicrogestureType.Invalid.
void OnEnable ( )
void OnDisable ( )
void OnValidate ( )
When the index finger is pinching, this will return true as it's considered a "press".
If the index finger was pinching (in other words, if IsPressed was true) and then it stops pinching, this will return true.
Returns the PointerPose.
See PointerPose for more information.
True when this object is not null.
This is different from IsDataValid, which refers to the validity of the data itself.
Returns true if IsDataValid is true and if the hand pointer ray should be shown.
Returns
Returns the type of this Hand (left or right), see Hand for more info.
Returns
If RayHelper is being used, this will update it with the strength of the current pinch (as explained in GetFingerPinchStrength(HandFinger).
Parameters
rayData
Did you find this page helpful?
Thumbs up icon
Thumbs down icon