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

SyntheticHand Class

Extends Hand
Used primarily for touch limiting during pokes and custom poses during grabs.
Alters hand data piped into this modifier to lock and unlock joints (wrist position and rotation, finger joint rotations). When switching between locked and unlocked states, additionally smooths out transitions by easing between source hand data and target hand data.

Member Enumerations

Enumeration WristLockMode

Position
= 1 << 0
Rotation
= 1 << 1
Full
= (1 << 2) - 1

Fields

System.Action UpdateRequired[Get]

Protected Functions

override void Start ( )
override void Apply
( HandDataAsset data )

Member Functions

Stores the rotation data for all joints in the hand, to be applied during the ApplyHand event.
Parameters
jointRotations
The joint rotations following the FingersMetadata.HAND_JOINT_IDS format.
overrideFactor
How much to lerp the fingers from the tracked (raw) state to the provided one.
Stores the rotation data for all joints for the given finger, to be applied during the ApplyHand event.
Parameters
finger
The finger for which to lock joints.
rotations
The joint rotations for each joint on the finger
overrideFactor
How much to lerp the fingers from the tracked (raw) state to the provided one.
void OverrideJointRotation
( HandJointId jointId,
Quaternion rotation,
float overrideFactor )
Immediately locks an individual finger (all its internal joints) at the last known value.
Parameters
finger
The finger for which to lock joints.
void LockJoint
( in HandJointId jointId,
Quaternion rotation,
float overrideFactor )
To use in conjunction with OverrideAllJoints, it sets the freedom state for a provided finger.
Opposite to LockFingerAtCurrent, this method uses the data provided in OverrideAllJoints instead of the last known state.
Parameters
freedomLevel
The freedom level for the finger
void SetJointFreedom
( in HandJointId jointId,
in JointFreedom freedomLevel,
bool skipAnimation )
JointFreedom GetJointFreedom
( in HandJointId jointId )
Short-hand method for setting the freedom level of all fingers in a hand to Free.
Similar to calling SetFingerFreedom for each single finger in the hand with a value of FingerFreedom.Free for the freedomLevel
Stores the desired pose to set the wrist of the hand to.
This is not necessarily the final pose of the hand, as it allows lerping between the tracked and provided one during the ApplyHand phase.To ensure the hand is locked at the desired pose, pass a value of 1 in the overrideFactor
Parameters
wristPose
The final pose desired for the wrist
lockMode
Either lock the position, rotation or both (default)
overrideFactor
How much to lerp between the tracked and the provided pose
skipAnimation
Whether to skip the animation curve for this override.
void LockWristPosition
( Vector3 position,
float overrideFactor,
bool skipAnimation )
void LockWristRotation
( Quaternion rotation,
float overrideFactor,
bool skipAnimation )
Unlocks the hand (locked at the OverrideWristPose method) starting a timer for the smooth release animation.
void InjectAllSyntheticHandModifier
( UpdateModeFlags updateMode,
IDataSource updateAfter,
DataModifier< HandDataAsset > modifyDataFromSource,
bool applyModifier,
ProgressCurve wristPositionLockCurve,
ProgressCurve wristPositionUnlockCurve,
ProgressCurve wristRotationLockCurve,
ProgressCurve wristRotationUnlockCurve,
ProgressCurve jointLockCurve,
ProgressCurve jointUnlockCurve,
float spreadAllowance )
void InjectWristPositionLockCurve
( ProgressCurve wristPositionLockCurve )
void InjectWristPositionUnlockCurve
( ProgressCurve wristPositionUnlockCurve )
void InjectWristRotationLockCurve
( ProgressCurve wristRotationLockCurve )
void InjectWristRotationUnlockCurve
( ProgressCurve wristRotationUnlockCurve )
void InjectJointLockCurve
( ProgressCurve jointLockCurve )
void InjectJointUnlockCurve
( ProgressCurve jointUnlockCurve )
void InjectSpreadAllowance
( float spreadAllowance )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon