API reference

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.

Fields

FingersStrength : float
Implementation of IHandGrabState.FingersStrength; for details, please refer to the related documentation provided for that interface.
Signature
float Oculus.Interaction.HandGrab.HandGrabUseInteractor.FingersStrength
IsGrabbing : bool
Implementation of IHandGrabState.IsGrabbing; for details, please refer to the related documentation provided for that interface.
Signature
bool Oculus.Interaction.HandGrab.HandGrabUseInteractor.IsGrabbing
WristStrength : float
Implementation of IHandGrabState.WristStrength; for details, please refer to the related documentation provided for that interface.
Signature
float Oculus.Interaction.HandGrab.HandGrabUseInteractor.WristStrength
WristToGrabPoseOffset : Pose
Implementation of IHandGrabState.WristToGrabPoseOffset; for details, please refer to the related documentation provided for that interface.
Signature
Pose Oculus.Interaction.HandGrab.HandGrabUseInteractor.WristToGrabPoseOffset

Properties

Hand : IHand
[Get]
The IHand used for both grabbing and using.
Though HandGrabUseInteractor is not an IHandGrabInteractor, this property is contractually similar to IHandGrabInteractor.Hand.
Signature
IHand Oculus.Interaction.HandGrab.HandGrabUseInteractor.Hand
HandGrabTarget : HandGrabTarget
[Get]
The HandGrab.HandGrabTarget used by this interactor when grabbing.
Signature
HandGrabTarget Oculus.Interaction.HandGrab.HandGrabUseInteractor.HandGrabTarget
UseAPI : IFingerUseAPI
[Get]
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).
Signature
IFingerUseAPI Oculus.Interaction.HandGrab.HandGrabUseInteractor.UseAPI
WhenHandGrabEnded : Action< IHandGrabState >
[Get][Set]
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.
Signature
Action<IHandGrabState> Oculus.Interaction.HandGrab.HandGrabUseInteractor.WhenHandGrabEnded
WhenHandGrabStarted : Action< IHandGrabState >
[Get][Set]
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.
Signature
Action<IHandGrabState> Oculus.Interaction.HandGrab.HandGrabUseInteractor.WhenHandGrabStarted

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractor.Awake()
Returns
override void
ComputeCandidate ()
Signature
override HandGrabUseInteractable Oculus.Interaction.HandGrab.HandGrabUseInteractor.ComputeCandidate()
Returns
override HandGrabUseInteractable
ComputeShouldSelect ()
Signature
override bool Oculus.Interaction.HandGrab.HandGrabUseInteractor.ComputeShouldSelect()
Returns
override bool
ComputeShouldUnselect ()
Signature
override bool Oculus.Interaction.HandGrab.HandGrabUseInteractor.ComputeShouldUnselect()
Returns
override bool
DoHoverUpdate ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractor.DoHoverUpdate()
Returns
override void
DoSelectUpdate ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractor.DoSelectUpdate()
Returns
override void
InteractableSelected ( interactable )
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractor.InteractableSelected(HandGrabUseInteractable interactable)
Parameters
Returns
override void
InteractableUnselected ( interactable )
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractor.InteractableUnselected(HandGrabUseInteractable interactable)
Parameters
Returns
override void
Start ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractor.Start()
Returns
override void

Methods

GrabbingFingers ()
Implementation of IHandGrabState.GrabbingFingers; for details, please refer to the related documentation provided for that interface.
Signature
HandFingerFlags Oculus.Interaction.HandGrab.HandGrabUseInteractor.GrabbingFingers()
Returns
HandFingerFlags
InjectAllHandGrabUseInteractor ( useApi )
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.
Signature
void Oculus.Interaction.HandGrab.HandGrabUseInteractor.InjectAllHandGrabUseInteractor(IFingerUseAPI useApi)
Parameters
Returns
void
InjectOptionalHand ( hand )
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.
Signature
void Oculus.Interaction.HandGrab.HandGrabUseInteractor.InjectOptionalHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectUseApi ( useApi )
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.
Signature
void Oculus.Interaction.HandGrab.HandGrabUseInteractor.InjectUseApi(IFingerUseAPI useApi)
Parameters
Returns
void