API reference

OVRGrabbable Class

Extends MonoBehaviour
An object that can be grabbed and thrown by OVRGrabber.

Protected Fields

bool m_allowOffhandGrab[Get]
bool m_snapPosition[Get]
bool m_snapOrientation[Get]
Transform m_snapOffset[Get]
Collider[] m_grabPoints[Get]
bool m_grabbedKinematic[Get]
Collider m_grabbedCollider[Get]
OVRGrabber m_grabbedBy[Get]

Properties

bool allowOffhandGrab[Get]
If true, the object can currently be grabbed.
bool isGrabbed[Get]
If true, the object is currently grabbed.
bool snapPosition[Get]
If true, the object's position will snap to match snapOffset when grabbed.
bool snapOrientation[Get]
If true, the object's orientation will snap to match snapOffset when grabbed.
Transform snapOffset[Get]
An offset relative to the OVRGrabber where this object can snap when grabbed.
OVRGrabber grabbedBy[Get]
Returns the OVRGrabber currently grabbing this object.
Transform grabbedTransform[Get]
The transform at which this object was grabbed.
Rigidbody grabbedRigidbody[Get]
The Rigidbody of the collider that was used to grab this object.
Collider[] grabPoints[Get]
The contact point(s) where the object was grabbed.

Member Functions

virtual void GrabBegin
( OVRGrabber hand,
Collider grabPoint )
Notifies the object that it has been grabbed.
virtual void GrabEnd
( Vector3 linearVelocity,
Vector3 angularVelocity )
Notifies the object that it has been released.

Protected Functions

virtual void Start ( )