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

HandAlignment : HandAlignType
[Get]
The HandAlignType by which this interactable will align itself to hand interactors which grab it.
The default value for this property is HandAlignType.AlignOnGrab.
Signature
HandAlignType Oculus.Interaction.HandGrab.IHandGrabInteractable.HandAlignment
PalmGrabRules : GrabbingRule
[Get]
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.
Signature
GrabbingRule Oculus.Interaction.HandGrab.IHandGrabInteractable.PalmGrabRules
PinchGrabRules : GrabbingRule
[Get]
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.
Signature
GrabbingRule Oculus.Interaction.HandGrab.IHandGrabInteractable.PinchGrabRules
Slippiness : float
[Get]
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.
Signature
float Oculus.Interaction.HandGrab.IHandGrabInteractable.Slippiness
SupportedGrabTypes : GrabTypeFlags
[Get]
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.
Signature
GrabTypeFlags Oculus.Interaction.HandGrab.IHandGrabInteractable.SupportedGrabTypes
UsesHandPose : bool
[Get]
Returns true if this uses any HandGrabPoses, false otherwise.
Signature
bool Oculus.Interaction.HandGrab.IHandGrabInteractable.UsesHandPose

Methods

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