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

HandGrabUtils Class

Static Methods

CreateHandGrabInteractable ( parent , name )
Creates a new HandGrabInteractable under the given object.
Signature
static HandGrabInteractable Oculus.Interaction.HandGrab.HandGrabUtils.CreateHandGrabInteractable(Transform parent, string name=null)
Parameters
parent: Transform  The relative object for the interactable
name: string  Name for the GameObject holding this interactable
Returns
HandGrabInteractable  An non-populated HandGrabInteractable
CreateHandGrabPose ( parent , relativeTo )
Signature
static HandGrabPose Oculus.Interaction.HandGrab.HandGrabUtils.CreateHandGrabPose(Transform parent, Transform relativeTo)
Parameters
parent: Transform
relativeTo: Transform
LoadData ( interactable , data )
Populates the HandGrabInteractable with the serialized data version.
Signature
static void Oculus.Interaction.HandGrab.HandGrabUtils.LoadData(HandGrabInteractable interactable, HandGrabInteractableData data)
Parameters
interactable: HandGrabInteractable
data: HandGrabInteractableData  The serialized data for the HandGrabInteractable.
Returns
void
LoadHandGrabPose ( interactable , poseData )
Signature
static HandGrabPose Oculus.Interaction.HandGrab.HandGrabUtils.LoadHandGrabPose(HandGrabInteractable interactable, HandGrabPoseData poseData)
Parameters
interactable: HandGrabInteractable
poseData: HandGrabPoseData
MirrorHandGrabPose ( originalPoint , mirrorPoint , relativeTo )
Generates a new HandGrabPoseData that mirrors the provided one.
Left hand becomes right hand and vice-versa. The mirror axis is defined by the surface of the snap point, if any, if none a best-guess is provided but note that it can then moved manually in the editor.
Signature
static void Oculus.Interaction.HandGrab.HandGrabUtils.MirrorHandGrabPose(HandGrabPose originalPoint, HandGrabPose mirrorPoint, Transform relativeTo)
Parameters
originalPoint: HandGrabPose  The point to mirror
mirrorPoint: HandGrabPose  The target HandGrabPose to set as mirrored of the originalPoint
relativeTo: Transform
Returns
void
SaveData ( interactable )
Serializes the data of the HandGrabInteractable so it can be stored.
Signature
static HandGrabInteractableData Oculus.Interaction.HandGrab.HandGrabUtils.SaveData(HandGrabInteractable interactable)
Parameters
interactable: HandGrabInteractable
Returns
HandGrabInteractableData  The struct data to recreate the interactable

Inner Structs

HandGrabInteractableData Struct

Serializable data-only version of the HandGrabInteractable so it can be stored when they are generated at Play-Mode (where Hand-tracking works).

Fields

grabType : GrabTypeFlags
Signature
GrabTypeFlags Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabInteractableData.grabType
handAlignment : HandAlignType
Signature
HandAlignType Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabInteractableData.handAlignment
palmGrabRules : GrabbingRule
Signature
GrabbingRule Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabInteractableData.palmGrabRules
pinchGrabRules : GrabbingRule
Signature
GrabbingRule Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabInteractableData.pinchGrabRules
poses : List< HandGrabPoseData >
Signature
List<HandGrabPoseData> Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabInteractableData.poses
scoringModifier : PoseMeasureParameters
Signature
PoseMeasureParameters Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabInteractableData.scoringModifier

HandGrabPoseData Struct

Serializable data-only version of the HandGrabPose so it can be stored when they are generated at Play-Mode (where Hand-tracking works).

Fields

gripPose : Pose
Signature
Pose Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabPoseData.gripPose
handPose : HandPose
Signature
HandPose Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabPoseData.handPose
scale : float
Signature
float Oculus.Interaction.HandGrab.HandGrabUtils.HandGrabPoseData.scale