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

DistanceHandGrabInteractable Class

The DistanceHandGrabInteractable allows grabbing the marked object from far away.
Internally it uses HandGrabPoses to specify not only the poses of the hands but the required gestures to perform the grab. It is recommended to reuse the same HandGrabPoses used by the HandGrabInteractable, and even select just a few so they become the default poses when distant grabbing.

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 [] Colliders
HandAlignment : HandAlignType
[Get][Set]
Implementation of IHandGrabInteractable.HandAlignment; for details, please refer to the related documentation provided for that interface.
Signature
HandAlignType HandAlignment
HandGrabPoses : List< HandGrabPose >
[Get]
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 Unity Editor.
Signature
List<HandGrabPose> HandGrabPoses
MovementProvider : IMovementProvider
[Get][Set]
The IMovementProvider used to move this interactable.
This value is populated during the MonoBehaviour's start-up process from the _movementProvider field, which is set from the Unity Editor. Manually specifying this value is optional; if none is provided, a MoveTowardsTargetProvider will be created during start-up for this role.
Signature
IMovementProvider MovementProvider
PalmGrabRules : GrabbingRule
[Get]
Implementation of IHandGrabInteractable.PalmGrabRules; for details, please refer to the related documentation provided for that interface.
Signature
GrabbingRule PalmGrabRules
PinchGrabRules : GrabbingRule
[Get]
Implementation of IHandGrabInteractable.PinchGrabRules; for details, please refer to the related documentation provided for that interface.
Signature
GrabbingRule PinchGrabRules
RelativeTo : Transform
[Get]
Implementation of IRelativeToRef.RelativeTo; for details, please refer to the related documentation provided for that interface.
Signature
Transform RelativeTo
ResetGrabOnGrabsUpdated : bool
[Get][Set]
Related to GrabInteractable.ResetGrabOnGrabsUpdated; forces a release on all other grabbing interactors when grabbed by a new interactor.
Signature
bool ResetGrabOnGrabsUpdated
Rigidbody : Rigidbody
[Get]
The Unity Rigidbody used for collision detection.
The returned value is from the _rigidbody field, which is set from the Unity Editor.
Signature
Rigidbody Rigidbody
Slippiness : float
[Get][Set]
Implementation of IHandGrabInteractable.Slippiness; for details, please refer to the related documentation provided for that interface.
Signature
float Slippiness
SupportedGrabTypes : GrabTypeFlags
[Get]
Implementation of IHandGrabInteractable.SupportedGrabTypes; for details, please refer to the related documentation provided for that interface.
Signature
GrabTypeFlags SupportedGrabTypes
UsesHandPose : bool
[Get]
Implementation of IHandGrabInteractable.UsesHandPose; for details, please refer to the related documentation provided for that interface.
Signature
bool UsesHandPose

Protected Methods

Awake ()
Signature
override void Awake()
Returns
override void
Reset ()
Signature
virtual void Reset()
Returns
void
Start ()
Signature
override void 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 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 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 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 GenerateMovement(in Pose from, in Pose to)
Parameters
from: in Pose
to: in Pose
Returns
IMovement
InjectAllDistanceHandGrabInteractable ( supportedGrabTypes , rigidbody , pinchGrabRules , palmGrabRules )
Convenience method combining InjectSupportedGrabTypes(GrabTypeFlags), InjectRigidbody(Rigidbody), InjectPinchGrabRules(GrabbingRule), and InjectPalmGrabRules(GrabbingRule).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void InjectAllDistanceHandGrabInteractable(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 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 InjectOptionalMovementProvider(IMovementProvider provider)
Parameters
Returns
void
InjectOptionalPhysicsGrabbable ( physicsObject )
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 InjectOptionalPhysicsGrabbable(PhysicsGrabbable physicsObject)
Parameters
physicsObject: PhysicsGrabbable
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 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 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 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 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 SupportsHandedness(Handedness handedness)
Parameters
handedness: Handedness
Returns
bool