Whether the object can be thrown with physics or not.
When the interactor releases this grabbable, it will be thrown based on the velocity the interactor had.
The index of the handle to use when distance-grabbed.
Use 0 for handle and 1 for handleSecondary.
The distance marker to use when distance-grabbed.
Public Attributes
List of objects to use as grab points.
If no object is provided, the grabbable is treated as its own grab point.
Objects with no GrabPoint component will have a default one created.
Visual state to apply to the interactor once interaction occurs.
Behavior overriden by GrabPoint.interactorVisualState if set.
Notifies once this object is released.
The notification only occurs when both grip point are free.
Notifies once a grab point is released.
Notifies once a grab point is selected for interaction.
Notifies once this object is grabbed.
The notification only occurs when first grabbed.
Pivot axis used when transformType is set to GrabRotationType.AroundPivot
Max distance to automatically stop grabbing.
Set a negative value to disable.
Pivot axis used when transformType is set to GrabRotationType.AroundPivot
Linear multiplier for the throwing angular speed.
By default, throws at the controller speed.
Linear multiplier for the throwing speed.
By default, throws at the controller speed.
If true, the grabbable will be updated based on the controller
velocity data, if available.
When false, the linear and angular velocities will be emulated based on
the grabbable previous orientation and position.
For more information, have a look at:
Static Typetrue is any of the two handles is currently grabbed.
true if the primary handle is grabbed, the object pointer by handle.
true if the secondary handle is grabbed, the object pointer by handleSecondary.
Programmatically grab an interactable.
The interactor issuing the interaction.
The interactable must be one of Grabbable.handle or Grabbable.handleSecondary.
This method is useful for grab emulation for non-VR applications. In general, you will not call this method but rather rely on collision checks between the Interactor and the Interactable.
Programmatically release an interactable.
The interactor issuing the interaction.
The interactable must be one of Grabbable.handle or Grabbable.handleSecondary.
This method is useful for grab emulation for non-VR applications. In general, you will not call this method but rather rely on collision checks between the Interactor and the Interactable.
Throws the grabbable.
Static on
Enables objects to be interactively grabbed and manipulated in a virtual environment.
The
Grabbableclass extends the basic functionality provided by the Interactable component to allow objects to be picked up, held, and potentially thrown by the user. It facilitates the creation of immersive and interactive experiences by providing an intuitive interface for object manipulation within a 3D scene.