HandPosing
A tool for quickly authoring hand poses to objects in VR using hand-tracking
|
This class controls the representation of a hand (typically a skin-mesh renderer) by moving its position/rotation and the rotations of the bones that compose it. More...
Public Member Functions | |
void | LerpBones (List< BonePose > bones, float weight) |
Rotates the bones of the hand towards the given ones using interpolation. More... | |
void | LerpGripOffset (HandPose pose, float weight, Transform relativeTo) |
Moves the hand positing/rotation towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform. More... | |
void | LerpGripOffset (Pose pose, float weight, Transform relativeTo) |
Moves the hand at a given pose towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform. More... | |
HandPose | TrackedPose (Transform relativeTo, bool includeBones=false) |
Gets the current represented hand pose oriented in relation to a given object. More... | |
Public Attributes | |
System.Action | OnPoseBeforeUpdate |
Callback before applying the puppeting to the hand representation. More... | |
System.Action | OnPoseUpdated |
Callback after applying the puppeting to the hand representation. More... | |
Properties | |
List< BoneMap > | Bones [get] |
General getter for the bones of the hand. More... | |
float | Scale [get] |
Current scale of the represented hand. More... | |
Transform | Grip [get] |
General getter for the grip point of the hand. More... | |
bool | IsTrackingHands [get] |
True if the user is using hand-tracking, false if using controllers. More... | |
Pose | TrackedGripOffset [get] |
Relative pose of the representated grip from the tracked hand. More... | |
Pose | TrackedGripPose [get] |
World rotation of the tracked More... | |
This class controls the representation of a hand (typically a skin-mesh renderer) by moving its position/rotation and the rotations of the bones that compose it.
The data that drives this puppet could come from a hand-tracking system but sometimes it is overriden by the snapping system. In that matter, it is also important to note the difference between tracked data and its representation, sometimes they might differ when the representation is overriden.
void HandPosing.HandPuppet.LerpBones | ( | List< BonePose > | bones, |
float | weight | ||
) |
Rotates the bones of the hand towards the given ones using interpolation.
bones | The target bone rotations. |
weight | Interpolation factor for the bones. 0 for staying with the current values, 1 for fully overriding with the new ones. |
void HandPosing.HandPuppet.LerpGripOffset | ( | HandPose | pose, |
float | weight, | ||
Transform | relativeTo | ||
) |
Moves the hand positing/rotation towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform.
pose | The relative target position for the grip point of the hand |
weight | Interpolation factor, 0 for not changing the hand, 1 for fully alligning the grip point with the given pose. |
relativeTo | The reference transform in which the pose is provided. |
void HandPosing.HandPuppet.LerpGripOffset | ( | Pose | pose, |
float | weight, | ||
Transform | relativeTo | ||
) |
Moves the hand at a given pose towards the given Grip pose using interpolation. The target pose is specified in local units from a reference transform.
pose | The relative target position for the grip point of the hand |
weight | Interpolation factor, 0 for not changing the hand, 1 for fully alligning the grip point with the given pose. |
relativeTo | The reference transform in which the pose is provided. |
HandPose HandPosing.HandPuppet.TrackedPose | ( | Transform | relativeTo, |
bool | includeBones = false |
||
) |
Gets the current represented hand pose oriented in relation to a given object.
relativeTo | The object from which to obtain the pose. Typically an object that is going to be grabbed. |
includeBones | True for including all the bones data in the result (default False) |
System.Action HandPosing.HandPuppet.OnPoseBeforeUpdate |
Callback before applying the puppeting to the hand representation.
System.Action HandPosing.HandPuppet.OnPoseUpdated |
Callback after applying the puppeting to the hand representation.
|
get |
General getter for the bones of the hand.
|
get |
General getter for the grip point of the hand.
|
get |
True if the user is using hand-tracking, false if using controllers.
|
get |
Current scale of the represented hand.
|
get |
Relative pose of the representated grip from the tracked hand.
|
get |
World rotation of the tracked