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

IHandGrabInteractable Interface

This interface characterizes an interactable which can be grabbed with an IHand using an interactor such as HandGrabInteractor or DistanceHandGrabInteractor.
Interactables of this kind share a number of commonalities and requirements specific to hand grabbing interactions; IHandGrabInteractable concretizes the unified contract for such interactables.

Properties

The HandAlignType by which this interactable will align itself to hand interactors which grab it.
The default value for this property is HandAlignType.AlignOnGrab.
Returns true if this uses any HandGrabPoses, false otherwise.
Defines the slippiness threshold so the interactor can slide along the interactable based on the strength of the grip.
Grab surfaces are required to slide. At a Slippiness of 0, the interactor never moves.
Returns a bit mask representing the different types of grab supported by this interactable.
Note that, because the returned value is a bit mask, it should not be checked directly against enum values as it may not appear in the enum at all. Instead, bitwise operations should be used to check for the presence of enum values within the mask: i.e., (mask & <see cref="GrabTypeFlags.Pinch"/>) != 0.
The rules for pinch grabbing this interactable.
If there are special conditions particular to this interactable as compared to pinch grabbing in general, this is where those conditions will be specified.
The rules for palm grabbing this interactable.
If there are special conditions particular to this interactable as compared to palm grabbing in general, this is where those conditions will be specified.

Member Functions

Checks whether or not the current interactable supports hand grab interaction by the specified hand.
Parameters
handedness
The handedness for which to confirm support
Returns
True if handedness is supported by this interactable, false otherwise
Invokes MovementProvider to create an IMovement which can move this interactable from from to to .
Parameters
from
The pose from which movement should begin; typically this is the interactable's current pose
to
The pose to which the movement should move
Returns
The requested IMovement from from to to
This method determines which HandGrabPose in HandGrabPoses is the best choice for a given grabbing hand.
This signature is obsolete; CalculateBestPose(in Pose, in Pose, Transform, float, Handedness, ref HandGrabResult) should be used instead.
Parameters
userPose
The position and orientation representing the grabbing hand; this can vary depending on whether the user is grabbing with pinch, palm, etc.
handScale
The scale of the grabbing hand
handedness
Whether the grabbing hand is a left hand or a right hand
result
The HandGrabResult representing the best pose
Returns
Always returns true
This method determines which HandGrabPose in HandGrabPoses is the best choice for a given grabbing hand.
Parameters
userPose
The position and orientation representing the grabbing hand; this can vary depending on whether the user is grabbing with pinch, palm, etc.
offset
The offset from userPose for accurate scoring
relativeTo
The transform to which the found pose should be relative
handScale
The scale of the grabbing hand
handedness
Whether the grabbing hand is a left hand or a right hand
result
The HandGrabResult representing the best pose
Did you find this page helpful?
Thumbs up icon
Thumbs down icon