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

GrabInteractor Class

Enables grab for objects within arm's reach that have a <cref="GrabInteractable" />.
It works with both controllers and hands, but for hands it's better to use HandGrabInteractor.

Properties

Rigidbody : Rigidbody
[Get]
Signature
Rigidbody Oculus.Interaction.GrabInteractor.Rigidbody
VelocityCalculator : IThrowVelocityCalculator
[Get][Set]
Signature
IThrowVelocityCalculator Oculus.Interaction.GrabInteractor.VelocityCalculator

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.GrabInteractor.Awake()
Returns
override void
ComputeCandidate ()
Signature
override GrabInteractable Oculus.Interaction.GrabInteractor.ComputeCandidate()
Returns
override GrabInteractable
ComputePointerPose ()
Signature
override Pose Oculus.Interaction.GrabInteractor.ComputePointerPose()
Returns
override Pose
ComputeShouldUnselect ()
Signature
override bool Oculus.Interaction.GrabInteractor.ComputeShouldUnselect()
Returns
override bool
DoPreprocess ()
Signature
override void Oculus.Interaction.GrabInteractor.DoPreprocess()
Returns
override void
DoSelectUpdate ()
Signature
override void Oculus.Interaction.GrabInteractor.DoSelectUpdate()
Returns
override void
HandlePointerEventRaised ( evt )
Signature
override void Oculus.Interaction.GrabInteractor.HandlePointerEventRaised(PointerEvent evt)
Parameters
Returns
override void
InteractableSelected ( interactable )
Signature
override void Oculus.Interaction.GrabInteractor.InteractableSelected(GrabInteractable interactable)
Parameters
interactable: GrabInteractable
Returns
override void
InteractableUnselected ( interactable )
Signature
override void Oculus.Interaction.GrabInteractor.InteractableUnselected(GrabInteractable interactable)
Parameters
interactable: GrabInteractable
Returns
override void
Start ()
Signature
override void Oculus.Interaction.GrabInteractor.Start()
Returns
override void

Methods

ForceRelease ()
Forces the controller to unselect the currently selected interactable.
Signature
void Oculus.Interaction.GrabInteractor.ForceRelease()
Returns
void
ForceSelect ( interactable )
Forces the controller to select a certain interactable even if it's not the closest.
Signature
void Oculus.Interaction.GrabInteractor.ForceSelect(GrabInteractable interactable)
Parameters
interactable: GrabInteractable
Returns
void
InjectAllGrabInteractor ( selector , rigidbody )
Adds a <cref="ISelector"/> and Rigidbody to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractor.InjectAllGrabInteractor(ISelector selector, Rigidbody rigidbody)
Parameters
selector: ISelector
rigidbody: Rigidbody
Returns
void
InjectOptionalGrabCenter ( grabCenter )
Adds a grab center to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractor.InjectOptionalGrabCenter(Transform grabCenter)
Parameters
grabCenter: Transform
Returns
void
InjectOptionalGrabTarget ( grabTarget )
Adds a grab target to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractor.InjectOptionalGrabTarget(Transform grabTarget)
Parameters
grabTarget: Transform
Returns
void
InjectOptionalVelocityCalculator ( velocityCalculator )
Adds a velocity calculator to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractor.InjectOptionalVelocityCalculator(IThrowVelocityCalculator velocityCalculator)
Parameters
velocityCalculator: IThrowVelocityCalculator
Returns
void
InjectRigidbody ( rigidbody )
Adds a Rigidbody to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractor.InjectRigidbody(Rigidbody rigidbody)
Parameters
rigidbody: Rigidbody
Returns
void
InjectSelector ( selector )
Adds an <cref="ISelector"/> to a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.GrabInteractor.InjectSelector(ISelector selector)
Parameters
selector: ISelector
Returns
void
Unselect ()
Signature
override void Oculus.Interaction.GrabInteractor.Unselect()
Returns
override void