API reference

HandGrabUtils Class

Static Member Functions

static HandGrabInteractable CreateHandGrabInteractable
( Transform parent,
string name )
Creates a new HandGrabInteractable under the given object.
Parameters
parent
The relative object for the interactable
name
Name for the GameObject holding this interactable
Returns
An non-populated HandGrabInteractable
static HandGrabPose CreateHandGrabPose
( Transform parent,
Transform relativeTo )
static void MirrorHandGrabPose
( HandGrabPose originalPoint,
HandGrabPose mirrorPoint,
Transform 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.
Parameters
originalPoint
The point to mirror
mirrorPoint
The target HandGrabPose to set as mirrored of the originalPoint
static HandGrabInteractableData SaveData
( HandGrabInteractable interactable )
Serializes the data of the HandGrabInteractable so it can be stored.
Returns
The struct data to recreate the interactable
static void LoadData
( HandGrabInteractable interactable,
Populates the HandGrabInteractable with the serialized data version.
Parameters
data
The serialized data for the HandGrabInteractable.
static HandGrabPose LoadHandGrabPose
( HandGrabInteractable interactable,
HandGrabPoseData poseData )