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

HandGrabUseInteractor Class

This interactor allows sending use-strength values to an interactable to create use interactions.
For example, pressing a trigger, squeezing a ball, etc. In order to calculate the usage strength of a finger it uses a IFingerUseAPI. This class is also an IHandGrabState, so it can be attached to a SyntheticHand to drive the fingers rotations, lerping between the relaxed hand pose and the tight hand pose provided by the interactable depending on the progress of the action.

Properties

The IHand used for both grabbing and using.
Though HandGrabUseInteractor is not an IHandGrabInteractor, this property is contractually similar to IHandGrabInteractor.Hand.
The IFingerUseAPI invoked by this interactor to determine the "finger use strength" of the Hand's fingers.
"Strength" in this context is a measure of of how similar/different the finger's state is to what the system considers "using"; a related overview of "strength" can be found in the documentation for IHand.GetFingerPinchStrength(HandFinger).
The HandGrab.HandGrabTarget used by this interactor when grabbing.
An event which could indicate that the current interactor (which would be passed to the event as an IHandGrabState) began grabbing.
In the current implementation, this event is never invoked. Instead, Interactor<TInteractor, TInteractable>.WhenStateChanged can be used to respond to the beginning of a grab; when that event is called with its argument's InteractorStateChangeArgs.NewState property set to InteractorState.Select, a grab interaction has started.
An event which could indicate that the current interactor (which would be passed to the event as an IHandGrabState) stopped grabbing.
In the current implementation, this event is never invoked. Instead, Interactor<TInteractor, TInteractable>.WhenStateChanged can be used to respond to the beginning of a grab; when that event is called with its argument's InteractorStateChangeArgs.PreviousState property set to InteractorState.Select, a grab interaction has ended.

Fields

Implementation of IHandGrabState.IsGrabbing; for details, please refer to the related documentation provided for that interface.
Implementation of IHandGrabState.WristStrength; for details, please refer to the related documentation provided for that interface.
Implementation of IHandGrabState.FingersStrength; for details, please refer to the related documentation provided for that interface.
Implementation of IHandGrabState.WristToGrabPoseOffset; for details, please refer to the related documentation provided for that interface.

Protected Functions

virtual override bool ComputeShouldSelect ( )
virtual override bool ComputeShouldUnselect ( )
virtual override void Awake ( )
virtual override void Start ( )
override void InteractableSelected
( HandGrabUseInteractable interactable )
override void InteractableUnselected
( HandGrabUseInteractable interactable )
virtual override void DoHoverUpdate ( )
virtual override void DoSelectUpdate ( )
virtual override HandGrabUseInteractable ComputeCandidate ( )

Member Functions

Implementation of IHandGrabState.GrabbingFingers; for details, please refer to the related documentation provided for that interface.
Adds all required scripts for a HandGrabUseInteractor to a dynamically instantiated GameObject.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds an IFingerUseAPI to a dynamically instantiated GameObject.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Adds an IHand to a dynamically instantiated GameObject.
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