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

HandGrabInteraction Class

Helper class for Hand Grabbing objects.
This class keeps track of the grabbing anchors and updates the target and movement during a Hand Grab interaction.

Static Member Functions

Calculates a new target.
That is the point of the interactable at which the HandGrab will happen.
Parameters
interactable
The interactable to be HandGrabbed
grabTypes
The supported GrabTypes
anchorMode
The anchor to use for grabbing
handGrabResult
The a variable to store the result
Returns
True if a valid pose was found
static GrabTypeFlags CurrentGrabType
( this IHandGrabInteractor handGrabInteractor )
Calculates a new target.
That is the point of the interactable at which the HandGrab will happen.
Parameters
handGrabInteractor
The interactor grabbing
interactable
The interactable to be HandGrabbed
grabFlags
The supported GrabTypes
activeGrabFlags
The anchor to use for grabbing
result
The a variable to store the result
Initiates the movement of the Interactable with the current HandGrabTarget.
Parameters
handGrabInteractor
The interactor grabbing
interactable
The interactable to be HandGrabbed
Gets the current pose of the current grabbing point.
Returns
The pose in world coordinates
Calculates the GrabPoseScore for an interactable with the given grab modes.
Parameters
handGrabInteractor
The interactor grabbing
interactable
The interactable to measure to
grabTypes
The supported grab types for the grab
result
Calculating the score requires finding the best grab pose. It is stored here.
Returns
The best GrabPoseScore considering the grabtypes at the interactable
Indicates if an interactor can interact with (hover and select) and interactable.
This depends on the handedness and the valid grab types of both elements
Parameters
handGrabInteractor
The interactor grabbing
handGrabInteractable
The interactable to be grabbed
Returns
True if the interactor could grab the interactable
Calculates the offset from the Wrist to the actual grabbing point defined by the current anchor in the interactor HandGrabTarget.
Parameters
handGrabInteractor
The interactor whose HandGrabTarget to inspect
Returns
The local offset from the wrist to the grab point
Calculates the strenght of the fingers of an interactor trying (or grabbing) an interactable.
Parameters
handGrabInteractor
The interactor grabbing
handGrabInteractable
The interactable being grabbed
handGrabTypes
A filter for the grab types to calculate
includeSelecting
Compute also fingers that are selecting
Returns
The maximum strength for the grabbing fingers, normalized
static GrabTypeFlags ComputeShouldSelect
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
static GrabTypeFlags ComputeShouldUnselect
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
static HandFingerFlags GrabbingFingers
( this IHandGrabInteractor handGrabInteractor,
IHandGrabInteractable handGrabInteractable )
Calculates the root of a grab and the practica offset to the grabbing point.
Parameters
handGrabInteractor
The interactor grabbing
anchorMode
The grab types to be used
pose
The root of the grab pose to use
offset
The offset form the root for accurate scoring
Did you find this page helpful?
Thumbs up icon
Thumbs down icon