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.

Fields

RelaxGrabPoints : List< HandGrabPose >
Signature
List<HandGrabPose> Oculus.Interaction.HandGrab.HandGrabUseInteractable.RelaxGrabPoints
TightGrabPoints : List< HandGrabPose >
Signature
List<HandGrabPose> Oculus.Interaction.HandGrab.HandGrabUseInteractable.TightGrabPoints
UseStrengthDeadZone : float
This property is a pure alias for StrengthDeadzone, included here to support aliased usage in existing code.
Signature
float Oculus.Interaction.HandGrab.HandGrabUseInteractable.UseStrengthDeadZone

Properties

StrengthDeadzone : float
[Get][Set]
Fingers whose strength value is below this dead zone will not be considered as snappers.
Signature
float Oculus.Interaction.HandGrab.HandGrabUseInteractable.StrengthDeadzone
UseFingers : GrabbingRule
[Get][Set]
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.
Signature
GrabbingRule Oculus.Interaction.HandGrab.HandGrabUseInteractable.UseFingers
UseProgress : float
[Get]
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.
Signature
float Oculus.Interaction.HandGrab.HandGrabUseInteractable.UseProgress

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractable.Awake()
Returns
override void
Reset ()
Signature
virtual void Oculus.Interaction.HandGrab.HandGrabUseInteractable.Reset()
Returns
void
SelectingInteractorAdded ( interactor )
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractable.SelectingInteractorAdded(HandGrabUseInteractor interactor)
Parameters
Returns
override void
SelectingInteractorRemoved ( interactor )
Signature
override void Oculus.Interaction.HandGrab.HandGrabUseInteractable.SelectingInteractorRemoved(HandGrabUseInteractor interactor)
Parameters
Returns
override void

Methods

ComputeUseStrength ( strength )
Updates UseProgress.
If an IHandGrabUseDelegate has been provided to this instance (either via the UnityEditor 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.
Signature
float Oculus.Interaction.HandGrab.HandGrabUseInteractable.ComputeUseStrength(float strength)
Parameters
strength: float  The value to which UseProgress should be set if this instance has not bee provided an IHandGrabUseDelegate
Returns
float  The new value of UseProgress
FindBestHandPoses ( handScale , relaxedHandPose , tightHandPose , score )
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.
Signature
bool Oculus.Interaction.HandGrab.HandGrabUseInteractable.FindBestHandPoses(float handScale, ref HandPose relaxedHandPose, ref HandPose tightHandPose, out float score)
Parameters
handScale: float  The scale of the tracked hand
relaxedHandPose: ref HandPose  Output parameter to be populated with the most suitable "relaxed" HandPose
tightHandPose: ref HandPose  Output parameter to be populated with the most suitable "tight" HandPose
score: out float  1 if suitable "relaxed" and "tight" HandPoses could both be found, 0 otherwise
Returns
bool  Always returns true
InjectOptionalForwardUseDelegate ( useDelegate )
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.
Signature
void Oculus.Interaction.HandGrab.HandGrabUseInteractable.InjectOptionalForwardUseDelegate(IHandGrabUseDelegate useDelegate)
Parameters
Returns
void
InjectOptionalRelaxedHandGrabPoints ( relaxedHandGrabPoints )
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.
Signature
void Oculus.Interaction.HandGrab.HandGrabUseInteractable.InjectOptionalRelaxedHandGrabPoints(List< HandGrabPose > relaxedHandGrabPoints)
Parameters
relaxedHandGrabPoints: List< HandGrabPose >
Returns
void
InjectOptionalTightHandGrabPoints ( tightHandGrabPoints )
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.
Signature
void Oculus.Interaction.HandGrab.HandGrabUseInteractable.InjectOptionalTightHandGrabPoints(List< HandGrabPose > tightHandGrabPoints)
Parameters
tightHandGrabPoints: List< HandGrabPose >
Returns
void