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

SyntheticHand Class

Extends Hand
Used primarily for touch limiting (modifying the motion of a tracked IHand so that it doesn't penetrate surfaces) 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

Enumeration of modes for "wrist locking," which is the mechanism SyntheticHand uses to alter the motion of an IHand for touch limiting.
This enum is intended to be used as a bit mask.
Position
= 1 << 0
Rotation
= 1 << 1
Full
= (1 << 2) - 1

Fields

A signal which can be used to alert observers that the SyntheticHand should be updated.

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 Apply(HandDataAsset).
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 Apply(HandDataAsset).
Parameters
finger
The HandFinger 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.
Overrides the rotation value for the specified HandJointId, to be applied during Apply(HandDataAsset).
Parameters
jointId
The HandJointId specifying which joint to override
rotation
The overriding rotation
overrideFactor
How much to lerp the fingers from the tracked (raw) state to the provided one
Immediately locks an individual HandFinger (all its internal joints) at the last known value.
Parameters
finger
The finger for which to lock joints.
Locks a specified joint to a specified overriding rotation.
Note that, because this is locking rather than interpolating, overrideFactor is not used by this call.
Parameters
jointId
The HandJointId specifying which joint to override
rotation
The rotation to which to lock
overrideFactor
Unused
To use in conjunction with OverrideAllJoints(in Quaternion[], float), this sets the freedom state for a provided finger.
Opposite to LockFingerAtCurrent(in HandFinger), this method uses the data provided in OverrideAllJoints(in Quaternion[], float) instead of the last known state.
Parameters
finger
The finger to modify, specified as a HandFinger
freedomLevel
The freedom level for the finger
skipAnimation
Whether or not to animate as a result of setting
To use in conjunction with OverrideAllJoints(in Quaternion[], float), this sets the freedom state for a provided finger.
Opposite to LockFingerAtCurrent(in HandFinger), this method uses the data provided in OverrideAllJoints(in Quaternion[], float) instead of the last known state.
Parameters
jointId
The finger to modify, specified as a HandJointId
freedomLevel
The freedom level for the finger
skipAnimation
Whether to skip the animation curve for this override
Queries the current JointFreedom for the specified finger.
Parameters
jointId
The finger, specified as a HandJointId
Returns
The JointFreedom of the specified finger
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 Apply(HandDataAsset).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.
Similar to LockWristPose(Pose, float, WristLockMode, bool, bool), but only locks the position, leaving orientation free.
Parameters
position
The position to which to lock the wrist
overrideFactor
How much to lerp between the tracked and the locked position
skipAnimation
Whether to skip the animation curve for this override
Similar to LockWristPose(Pose, float, WristLockMode, bool, bool), but only locks the rotation, leaving position free.
Parameters
rotation
The rotation to which to lock the wrist
overrideFactor
How much to lerp between the tracked and the locked rotation
skipAnimation
Whether to skip the animation curve for this override
Unlocks the hand (locked using LockWristPose(Pose, float, WristLockMode, bool, bool) or one of its sibling methods) starting a timer for the smooth release animation.
Injects all required dependencies for a dynamically instantiated SyntheticHand; effectively wraps Hand.InjectAllHand(DataSource<HandDataAsset>.UpdateModeFlags, IDataSource, DataModifier<HandDataAsset>, bool), InjectWristPositionLockCurve(ProgressCurve), InjectWristPositionUnlockCurve(ProgressCurve), InjectWristRotationLockCurve(ProgressCurve), InjectWristRotationUnlockCurve(ProgressCurve), InjectJointLockCurve(ProgressCurve), InjectJointUnlockCurve(ProgressCurve), and InjectSpreadAllowance(float).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a ProgressCurve to a dynamically instantiated SyntheticHand as the animation curve for wrist position locking.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a ProgressCurve to a dynamically instantiated SyntheticHand as the animation curve for wrist position unlocking.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a ProgressCurve to a dynamically instantiated SyntheticHand as the animation curve for wrist rotation locking.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a ProgressCurve to a dynamically instantiated SyntheticHand as the animation curve for wrist rotation unlocking.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a ProgressCurve to a dynamically instantiated SyntheticHand as the animation curve for joint locking.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a ProgressCurve to a dynamically instantiated SyntheticHand as the animation curve for joint unlocking.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds a floating point value to a dynamically instantiated SyntheticHand as spread allowance.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon