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

HandGrabInteractable Class

Makes an object grabbable by hands so long as it's within arm's reach.
A HandGrabInteractable indicates the properties about how a hand can HandGrab an object. It specifies the fingers that must perform the grab and the release and generates the events for the Pointable to move the object. Optionally it can reference a list of differently scaled HandGrabPoses to inform the interactor about the best pose the hand should adopt when grabbing the object with different sized hands.

Fields

HandGrabPoses : List< HandGrabPose >
Retrieves the list of HandGrabPoses which can be used to grab this interactable.
This returns the value of the _handGrabPoses field, which is typically set from the UnityEditor.
Signature
List<HandGrabPose> Oculus.Interaction.HandGrab.HandGrabInteractable.HandGrabPoses
PalmGrabRules : GrabbingRule
Implementation of IHandGrabInteractable.PalmGrabRules; for details, please refer to the related documentation provided for that interface.
Signature
GrabbingRule Oculus.Interaction.HandGrab.HandGrabInteractable.PalmGrabRules
PinchGrabRules : GrabbingRule
Implementation of IHandGrabInteractable.PinchGrabRules; for details, please refer to the related documentation provided for that interface.
Signature
GrabbingRule Oculus.Interaction.HandGrab.HandGrabInteractable.PinchGrabRules
RelativeTo : Transform
Implementation of IRelativeToRef.RelativeTo; for details, please refer to the related documentation provided for that interface.
Signature
Transform Oculus.Interaction.HandGrab.HandGrabInteractable.RelativeTo
Rigidbody : Rigidbody
The Unity Rigidbody used for collision detection.
The returned value is from the _rigidbody field, which is set from the UnityEditor.
Signature
Rigidbody Oculus.Interaction.HandGrab.HandGrabInteractable.Rigidbody
ScoreModifier : PoseMeasureParameters
Returns the PoseMeasureParameters used in the scoring mechanism which selects which of the available hand grab poses should be used for interaction.
Signature
PoseMeasureParameters Oculus.Interaction.HandGrab.HandGrabInteractable.ScoreModifier
SupportedGrabTypes : GrabTypeFlags
Implementation of IHandGrabInteractable.SupportedGrabTypes; for details, please refer to the related documentation provided for that interface.
Signature
GrabTypeFlags Oculus.Interaction.HandGrab.HandGrabInteractable.SupportedGrabTypes
UsesHandPose : bool
Implementation of IHandGrabInteractable.UsesHandPose; for details, please refer to the related documentation provided for that interface.
Signature
bool Oculus.Interaction.HandGrab.HandGrabInteractable.UsesHandPose

Properties

Colliders : Collider []
[Get]
The list of Unity Colliders associated with this interactable.
This list is automatically populated during the MonoBehaviour's start-up process and will contain a reference to every Collider in Rigidbody's hierarchy at that time. This list is not allowed to be empty, meaning there must be at least one Collider in Rigidbody's hierarchy at the time the DistanceHandGrabInteractable first becomes active.
Signature
Collider [] Oculus.Interaction.HandGrab.HandGrabInteractable.Colliders
HandAlignment : HandAlignType
[Get][Set]
Implementation of IHandGrabInteractable.HandAlignment; for details, please refer to the related documentation provided for that interface.
Signature
HandAlignType Oculus.Interaction.HandGrab.HandGrabInteractable.HandAlignment
ResetGrabOnGrabsUpdated : bool
[Get][Set]
Related to GrabInteractable.ResetGrabOnGrabsUpdated; forces a release on all other grabbing interactors when grabbed by a new interactor.
Signature
bool Oculus.Interaction.HandGrab.HandGrabInteractable.ResetGrabOnGrabsUpdated
Slippiness : float
[Get][Set]
Implementation of IHandGrabInteractable.Slippiness; for details, please refer to the related documentation provided for that interface.
Signature
float Oculus.Interaction.HandGrab.HandGrabInteractable.Slippiness

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabInteractable.Awake()
Returns
override void
Reset ()
Signature
virtual void Oculus.Interaction.HandGrab.HandGrabInteractable.Reset()
Returns
void
Start ()
Signature
override void Oculus.Interaction.HandGrab.HandGrabInteractable.Start()
Returns
override void

Methods

ApplyVelocities ( linearVelocity , angularVelocity )
Obsolete: this was used to apply velocities from an Throw.IThrowVelocityCalculator, which is deprecated.
Velocity calculation capabilities are now a feature of Grabbable and should be controlled from there.
Signature
void Oculus.Interaction.HandGrab.HandGrabInteractable.ApplyVelocities(Vector3 linearVelocity, Vector3 angularVelocity)
Parameters
linearVelocity: Vector3
angularVelocity: Vector3
Returns
void
CalculateBestPose ( userPose , handScale , handedness , result )
Implementation of IHandGrabInteractable.CalculateBestPose(Pose, float, Handedness, ref HandGrabResult); for details, please refer to the related documentation provided for that interface.
Signature
bool Oculus.Interaction.HandGrab.HandGrabInteractable.CalculateBestPose(Pose userPose, float handScale, Handedness handedness, ref HandGrabResult result)
Parameters
userPose: Pose
handScale: float
handedness: Handedness
result: ref HandGrabResult
Returns
bool
CalculateBestPose ( userPose , offset , relativeTo , handScale , handedness , result )
Implementation of IHandGrabInteractable.CalculateBestPose(in Pose, in Pose, Transform, float, Handedness, ref HandGrabResult); for details, please refer to the related documentation provided for that interface.
Signature
void Oculus.Interaction.HandGrab.HandGrabInteractable.CalculateBestPose(in Pose userPose, in Pose offset, Transform relativeTo, float handScale, Handedness handedness, ref HandGrabResult result)
Parameters
userPose: in Pose
offset: in Pose
relativeTo: Transform
handScale: float
handedness: Handedness
result: ref HandGrabResult
Returns
void
GenerateMovement ( from , to )
Implementation of IHandGrabInteractable.GenerateMovement(in Pose, in Pose); for details, please refer to the related documentation provided for that interface.
Signature
IMovement Oculus.Interaction.HandGrab.HandGrabInteractable.GenerateMovement(in Pose from, in Pose to)
Parameters
from: in Pose
to: in Pose
Returns
IMovement
InjectAllHandGrabInteractable ( supportedGrabTypes , rigidbody , pinchGrabRules , palmGrabRules )
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.HandGrabInteractable.InjectAllHandGrabInteractable(GrabTypeFlags supportedGrabTypes, Rigidbody rigidbody, GrabbingRule pinchGrabRules, GrabbingRule palmGrabRules)
Parameters
supportedGrabTypes: GrabTypeFlags
rigidbody: Rigidbody
pinchGrabRules: GrabbingRule
palmGrabRules: GrabbingRule
Returns
void
InjectOptionalHandGrabPoses ( handGrabPoses )
Adds a list of DistanceHandGrabInteractor as HandGrabPoses to a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectOptionalHandGrabPoses(List< HandGrabPose > handGrabPoses)
Parameters
handGrabPoses: List< HandGrabPose >
Returns
void
InjectOptionalMovementProvider ( provider )
Adds an IMovementProvider as MovementProvider to a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectOptionalMovementProvider(IMovementProvider provider)
Parameters
Returns
void
InjectOptionalPhysicsGrabbable ( physicsGrabbable )
Obsolete: adds a PhysicsGrabbable to a dynamically instantiated GameObject.
This functionality is now provided as part of Grabbable and no longer needs to be handled independently. 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.HandGrabInteractable.InjectOptionalPhysicsGrabbable(PhysicsGrabbable physicsGrabbable)
Parameters
physicsGrabbable: PhysicsGrabbable
Returns
void
InjectOptionalScoreModifier ( scoreModifier )
Adds a list of DistanceHandGrabInteractor as HandGrabPoses to a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectOptionalScoreModifier(PoseMeasureParameters scoreModifier)
Parameters
scoreModifier: PoseMeasureParameters
Returns
void
InjectPalmGrabRules ( palmGrabRules )
Adds a GrabbingRule as PalmGrabRules to a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectPalmGrabRules(GrabbingRule palmGrabRules)
Parameters
palmGrabRules: GrabbingRule
Returns
void
InjectPinchGrabRules ( pinchGrabRules )
Adds a GrabbingRule as PinchGrabRules to a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectPinchGrabRules(GrabbingRule pinchGrabRules)
Parameters
pinchGrabRules: GrabbingRule
Returns
void
InjectRigidbody ( rigidbody )
Adds a Unity Rigidbody as Rigidbody to a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void
InjectSupportedGrabTypes ( supportedGrabTypes )
Adds a GrabTypeFlags as SupportedGrabTypes in a dynamically instantiated DistanceHandGrabInteractable.
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.HandGrabInteractable.InjectSupportedGrabTypes(GrabTypeFlags supportedGrabTypes)
Parameters
supportedGrabTypes: GrabTypeFlags
Returns
void
SupportsHandedness ( handedness )
Implementation of IHandGrabInteractable.SupportsHandedness(Handedness); for details, please refer to the related documentation provided for that interface.
Signature
bool Oculus.Interaction.HandGrab.HandGrabInteractable.SupportsHandedness(Handedness handedness)
Parameters
handedness: Handedness
Returns
bool