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

GrabInteractor Class

The GrabInteractor class facilitates interaction with objects that have a GrabInteractable component.
It supports interaction via both controllers and hands, though the HandGrabInteractor is recommended for hand interactions. This class provides advanced control over grab interactions, including forced selection and release, and dynamic component injection.

Fields

Rigidbody Rigidbody[Get]

Properties

IThrowVelocityCalculator VelocityCalculator[Get]

Protected Functions

override void Awake ( )
override void Start ( )
override void DoPreprocess ( )
override GrabInteractable ComputeCandidate ( )
override void InteractableSelected
( GrabInteractable interactable )
override void InteractableUnselected
( GrabInteractable interactable )
virtual override void HandlePointerEventRaised
( PointerEvent evt )
virtual override Pose ComputePointerPose ( )
override void DoSelectUpdate ( )
override bool ComputeShouldUnselect ( )

Member Functions

Forces the controller to select a specific GrabInteractable even if it is not the closest available option.
This method overrides the default selection process, allowing for programmatic control over which interactable is selected.
Forces the controller to unselect the currently selected GrabInteractable.
This method clears any overrides set by ForceSelect and reverts to the default selection behavior.
This method unselects the currently selected interactable, and in addition reverts any selection overrides if necessary.
Injects both a ISelector and a Rigidbody into a dynamically instantiated GameObject.
Parameters
selector
The selector component to be added.
rigidbody
The Rigidbody component to be added.
Adds a ISelector to a dynamically instantiated GameObject.
Parameters
selector
The external selector component to be added.
Adds a Rigidbody to a dynamically instantiated GameObject, enhancing the physical interaction capabilities by providing an external Rigidbody component.
Optionally adds a grab center to a dynamically instantiated GameObject, allowing for precise control over the center of grabbing operations by providing an external grab center transform.
Optionally adds a grab target to a dynamically instantiated GameObject, enabling targeted grabbing operations by providing an external grab target transform.
Adds a velocity calculator to a dynamically instantiated GameObject.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon