An object that can be grabbed and thrown by OVRGrabber. More...

Inheritance diagram for OVRGrabbable:
OculusSampleFramework.ColorGrabbable OculusSampleFramework.DistanceGrabbable

Public Member Functions

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

Protected Member Functions

virtual void Start ()
 

Protected Attributes

bool m_allowOffhandGrab = true
 
bool m_snapPosition = false
 
bool m_snapOrientation = false
 
Transform m_snapOffset
 
Collider [] m_grabPoints = null
 
bool m_grabbedKinematic = false
 
Collider m_grabbedCollider = null
 
OVRGrabber m_grabbedBy = null
 

Properties

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

Detailed Description

An object that can be grabbed and thrown by OVRGrabber.

Member Function Documentation

◆ GrabBegin()

virtual void OVRGrabbable.GrabBegin ( OVRGrabber  hand,
Collider  grabPoint 
)
virtual

Notifies the object that it has been grabbed.

Reimplemented in OculusSampleFramework.ColorGrabbable.

◆ GrabEnd()

virtual void OVRGrabbable.GrabEnd ( Vector3  linearVelocity,
Vector3  angularVelocity 
)
virtual

Notifies the object that it has been released.

Reimplemented in OculusSampleFramework.ColorGrabbable.

◆ Start()

virtual void OVRGrabbable.Start ( )
protectedvirtual

Member Data Documentation

◆ m_allowOffhandGrab

bool OVRGrabbable.m_allowOffhandGrab = true
protected

◆ m_grabbedBy

OVRGrabber OVRGrabbable.m_grabbedBy = null
protected

◆ m_grabbedCollider

Collider OVRGrabbable.m_grabbedCollider = null
protected

◆ m_grabbedKinematic

bool OVRGrabbable.m_grabbedKinematic = false
protected

◆ m_grabPoints

Collider [] OVRGrabbable.m_grabPoints = null
protected

◆ m_snapOffset

Transform OVRGrabbable.m_snapOffset
protected

◆ m_snapOrientation

bool OVRGrabbable.m_snapOrientation = false
protected

◆ m_snapPosition

bool OVRGrabbable.m_snapPosition = false
protected

Property Documentation

◆ allowOffhandGrab

bool OVRGrabbable.allowOffhandGrab
get

If true, the object can currently be grabbed.

◆ grabbedBy

OVRGrabber OVRGrabbable.grabbedBy
get

Returns the OVRGrabber currently grabbing this object.

◆ grabbedRigidbody

Rigidbody OVRGrabbable.grabbedRigidbody
get

The Rigidbody of the collider that was used to grab this object.

◆ grabbedTransform

Transform OVRGrabbable.grabbedTransform
get

The transform at which this object was grabbed.

◆ grabPoints

Collider [] OVRGrabbable.grabPoints
get

The contact point(s) where the object was grabbed.

◆ isGrabbed

bool OVRGrabbable.isGrabbed
get

If true, the object is currently grabbed.

◆ snapOffset

Transform OVRGrabbable.snapOffset
get

An offset relative to the OVRGrabber where this object can snap when grabbed.

◆ snapOrientation

bool OVRGrabbable.snapOrientation
get

If true, the object's orientation will snap to match snapOffset when grabbed.

◆ snapPosition

bool OVRGrabbable.snapPosition
get

If true, the object's position will snap to match snapOffset when grabbed.


The documentation for this class was generated from the following file: