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

TouchHandGrabInteractor Class

Provides a hand-specific, collisions-based, grab interaction model (distinct from HandGrab.HandGrabInteractor's spatial hueristic approach) where selection begins when finger tips overlap with an associated interactable.
Upon selection, the distance between the fingers and thumb is cached and is used for determining the point of release - when fingers are outside of the cached distance. This interaction mode simulates the physicality of grabbing a real-world object with the fingertips.

Protected Fields

GrabPrerequisite : IActiveState
Signature
IActiveState Oculus.Interaction.TouchHandGrabInteractor.GrabPrerequisite
HandSphereMap : IHandSphereMap
Signature
IHandSphereMap Oculus.Interaction.TouchHandGrabInteractor.HandSphereMap

Events

WhenFingerLocked : Action
Event invoked to indicate changes in which fingers are locked by the TouchHandGrabInteractor.
For information about which specific finger's locking state has changed, check IsFingerLocked(HandFinger).
During touch interaction, fingers are locked when the tracked finger penetrates the TouchHandGrabInteractable; this locking prevents the visualized finger from clipping overmuch into the interactable's visualization.
Signature
Action Oculus.Interaction.TouchHandGrabInteractor.WhenFingerLocked

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.Awake()
Returns
override void
ComputeCandidate ()
Signature
override TouchHandGrabInteractable Oculus.Interaction.TouchHandGrabInteractor.ComputeCandidate()
ComputePointerPose ()
Signature
override Pose Oculus.Interaction.TouchHandGrabInteractor.ComputePointerPose()
Returns
override Pose
ComputeShouldSelect ()
Signature
override bool Oculus.Interaction.TouchHandGrabInteractor.ComputeShouldSelect()
Returns
override bool
ComputeShouldUnselect ()
Signature
override bool Oculus.Interaction.TouchHandGrabInteractor.ComputeShouldUnselect()
Returns
override bool
DoHoverUpdate ()
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.DoHoverUpdate()
Returns
override void
DoPostprocess ()
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.DoPostprocess()
Returns
override void
DoPreprocess ()
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.DoPreprocess()
Returns
override void
DoSelectUpdate ()
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.DoSelectUpdate()
Returns
override void
Start ()
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.Start()
Returns
override void

Methods

GetFingerJoints ( finger )
Retrieves positional data for the requested finger 's joints.
This is useful for rendering a finger visualization based on the "locked" non-penetrating finger position.
Signature
Pose [] Oculus.Interaction.TouchHandGrabInteractor.GetFingerJoints(HandFinger finger)
Parameters
finger: HandFinger  The finger for which to retrieve positional data.
Returns
Pose []  The Poses of the joints of the requested finger .
InjectAllTouchHandGrabInteractor ( hand , openHand , handSphereMap , hoverLocation , grabLocation )
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.TouchHandGrabInteractor.InjectAllTouchHandGrabInteractor(IHand hand, IHand openHand, IHandSphereMap handSphereMap, Transform hoverLocation, Transform grabLocation)
Parameters
hand: IHand
openHand: IHand
handSphereMap: IHandSphereMap
hoverLocation: Transform
grabLocation: Transform
Returns
void
InjectGrabLocation ( grabLocation )
Sets a Transform as the grab location for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectGrabLocation(Transform grabLocation)
Parameters
grabLocation: Transform
Returns
void
InjectHand ( hand )
Sets an IHand as the hand for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectHandSphereMap ( handSphereMap )
Sets an IHandSphereMap as the hand sphere map for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectHandSphereMap(IHandSphereMap handSphereMap)
Parameters
handSphereMap: IHandSphereMap
Returns
void
InjectHoverLocation ( hoverLocation )
Sets a Transform as the hover location for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectHoverLocation(Transform hoverLocation)
Parameters
hoverLocation: Transform
Returns
void
InjectOpenHand ( openHand )
Sets an IHand as the "open hand" for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectOpenHand(IHand openHand)
Parameters
openHand: IHand
Returns
void
InjectOptionalCurlDeltaThreshold ( threshold )
Programmatically sets the curl delta threshold for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectOptionalCurlDeltaThreshold(float threshold)
Parameters
threshold: float
Returns
void
InjectOptionalCurlTimeThreshold ( seconds )
Programmatically sets the curl time threshold for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectOptionalCurlTimeThreshold(float seconds)
Parameters
seconds: float
Returns
void
InjectOptionalGrabPrerequisite ( grabPrerequisite )
Sets an IActiveState as a grab prerequisite for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectOptionalGrabPrerequisite(IActiveState grabPrerequisite)
Parameters
grabPrerequisite: IActiveState
Returns
void
InjectOptionalIterations ( iterations )
Programmatically sets the iteratiosn for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectOptionalIterations(int iterations)
Parameters
iterations: int
Returns
void
InjectOptionalMinHoverDistance ( minHoverDistance )
Programmatically sets the min hover distance for a dynamically instantiated TouchHandGrabInteractor.
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.TouchHandGrabInteractor.InjectOptionalMinHoverDistance(float minHoverDistance)
Parameters
minHoverDistance: float
Returns
void
InjectOptionalTimeProvider ( timeProvider )
Signature
void Oculus.Interaction.TouchHandGrabInteractor.InjectOptionalTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >
Returns
void
IsFingerLocked ( finger )
Checks whether a finger has been locked by the interaction in order to prevent it from penetrating the TouchHandGrabInteractable.
Signature
bool Oculus.Interaction.TouchHandGrabInteractor.IsFingerLocked(HandFinger finger)
Parameters
finger: HandFinger  The finger to check for locking.
Returns
bool  True if finger is locked, false otherwise.
SetTimeProvider ( timeProvider )
Sets the time provider for this sequence, allowing for the default time provider (Unity's built-in Time.time) to be overridden with custom behavior to enable pausing, time dilation, etc.
Signature
void Oculus.Interaction.TouchHandGrabInteractor.SetTimeProvider(Func< float > timeProvider)
Parameters
timeProvider: Func< float >  The new time provider to be used by this instance.
Returns
void
Unselect ()
Overrides IInteractor.Unselect; this is core Interaction SDK logic and should not be invoked directly outside of core functionality.
For more information, see the relevant remarks on IInteractor.
Signature
override void Oculus.Interaction.TouchHandGrabInteractor.Unselect()
Returns
override void