Grab Point
Description
Each non-precision object you create has to have a grab point, this class represents it. It contains and updates data about positional and rotational offset of its parent object. It is used to store a hand pose for the InteractionHand to look for. Also, it has a helper script to instantiate a preview pose when manipulating grab points and creating hand poses
Public properties
HandType HandType
enum responsible for setting the type of the interaction hand (left or right) this object should respond to
this information must be set up manually
CustomHandPose GrabPose
grab pose - scriptable that will be applied to the interacting grab controller's poseable mesh once this object is grabbed
contains information about the rotation of individual bones under the root of each finger, as well as the positional and rotational data of the pose itself
Grabbable ParentGrabbable
the grabbable object acting as a parent to this grab point
Vector3 Offset
positional offset used by GrabPointController when snapping the object's position
Quaternion RotationOffset
rotational offset used by GrabPointController when snapping the object's rotation
bool isGrabbed
true when the object is grabbed
GameObject InstantiatedPreviewHand
reference used by the method for instantiating preview hand poses
this reference is necessary in order to possibly shuffle through multiple grab poses without compromising the actual asset or scriptable object
Public methods
void UpdatePositionOffset()
multiplies the inverse of the grabbable object's rotation with the sum of the negative position of the grabbable and the position of the grab point to the calculate positional offset
void UpdateRotationOffset()
multiplies the rotation of the grabbable object's rotation with the grab points rotation in order to calculate the rotational offset
void InstantiateHandPose()
instantiates a preview hand prefab from the resource folder and offsets it to the palm of the hand
this method is used by the editor script for hand posing to give you a visual representation of the pose for easier grab point positioning and hand posing
Last updated