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

HandGrabUseInteractable Class

This interactable specifies the final pose a hand will have, via HandGrabPoses, when using the interactable, and also the rules to use it.
It also provides the relaxed and tight poses to modify the visual hand depending on the progress of the interaction. By default, it will update the UseProgress of the interaction to the strength of usage, but it is possible to reference a IHandGrabUseDelegate to derive this calculation to a separate script.

Properties

IHandGrabUseDelegate HandUseDelegate[Get]
A GrabbingRule specifying the requirements for advancing UseProgress when grabbing and using this interactable.
All required fingers must be using in order to reach maximum progress, when no required fingers are present, the strongest optional finger can drive the progress value.
Fingers whose strength value is below this dead zone will not be considered as snappers.
Value indicating the progress of the use interaction.
This value is in the style of a "strength" as discussed in Input.IHand.GetFingerPinchStrength(Input.HandFinger) and varies from 0 to 1 depending on how weakly or strongly, respectively, this interactable is being used.
List< HandGrabPose > RelaxGrabPoints[Get]
List< HandGrabPose > TightGrabPoints[Get]
This property is a pure alias for StrengthDeadzone, included here to support aliased usage in existing code.

Protected Functions

virtual void Reset ( )
virtual override void Awake ( )
override void SelectingInteractorAdded
( HandGrabUseInteractor interactor )
override void SelectingInteractorRemoved
( HandGrabUseInteractor interactor )

Member Functions

Updates UseProgress.
If an IHandGrabUseDelegate has been provided to this instance (either via the Unity Editor or using InjectOptionalForwardUseDelegate(IHandGrabUseDelegate)), that delegate will be invoked to calculate the new value for UseProgress; otherwise, the provided parameter strength will be set as the new UseProgress.
Parameters
strength
The value to which UseProgress should be set if this instance has not bee provided an IHandGrabUseDelegate
Returns
The new value of UseProgress
Attempts to find the HandPoses representing both "tight" (maximum UseProgress and "relaxed" (minimum UseProgress) which are most suitable to the current state of the tracked hand.
If this interactable is being used to drive a Input.SyntheticHand or other visualization, that visualization can leverage these poses to produce an interpolated intermediate pose reflective of the current UseProgress.
Parameters
handScale
The scale of the tracked hand
relaxedHandPose
Output parameter to be populated with the most suitable "relaxed" HandPose
tightHandPose
Output parameter to be populated with the most suitable "tight" HandPose
score
1 if suitable "relaxed" and "tight" HandPoses could both be found, 0 otherwise
Returns
Always returns true
Adds an IHandGrabUseDelegate to a dynamically instantiated HandGrabUseInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the list of "relaxed" HandGrabPoses for a dynamically instantiated HandGrabUseInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the list of "tight" HandGrabPoses for a dynamically instantiated HandGrabUseInteractable.
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