API reference

OVRGrabber Class

Extends MonoBehaviour
Allows grabbing and throwing of objects with the OVRGrabbable component on them.

Protected Fields

m_anchorOffsetPosition : Vector3
Signature
Vector3 m_anchorOffsetPosition
m_anchorOffsetRotation : Quaternion
Signature
Quaternion m_anchorOffsetRotation
m_controller : OVRInput.Controller
Signature
OVRInput.Controller m_controller
m_grabbedObj : OVRGrabbable
Signature
OVRGrabbable m_grabbedObj
m_grabbedObjectPosOff : Vector3
Signature
Vector3 m_grabbedObjectPosOff
m_grabbedObjectRotOff : Quaternion
Signature
Quaternion m_grabbedObjectRotOff
m_grabCandidates : Dictionary< OVRGrabbable, int >
Signature
Dictionary<OVRGrabbable, int> m_grabCandidates
m_grabVolumeEnabled : bool
Signature
bool m_grabVolumeEnabled
m_grabVolumes : Collider[]
Signature
Collider [] m_grabVolumes
m_gripTransform : Transform
Signature
Transform m_gripTransform
m_lastPos : Vector3
Signature
Vector3 m_lastPos
m_lastRot : Quaternion
Signature
Quaternion m_lastRot
m_moveHandPosition : bool
Signature
bool m_moveHandPosition
m_operatingWithoutOVRCameraRig : bool
Signature
bool m_operatingWithoutOVRCameraRig
m_parentHeldObject : bool
Signature
bool m_parentHeldObject
m_parentTransform : Transform
Signature
Transform m_parentTransform
m_player : GameObject
Signature
GameObject m_player
m_prevFlex : float
Signature
float m_prevFlex

Fields

grabBegin : float
Signature
float grabBegin
grabEnd : float
Signature
float grabEnd

Properties

grabbedObject : OVRGrabbable
[Get]
The currently grabbed object.
Signature
OVRGrabbable grabbedObject

Protected Methods

Awake ()
Signature
virtual void Awake()
Returns
void
CheckForGrabOrRelease ( prevFlex )
Signature
void CheckForGrabOrRelease(float prevFlex)
Parameters
prevFlex: float
Returns
void
GrabbableRelease ( linearVelocity , angularVelocity )
Signature
void GrabbableRelease(Vector3 linearVelocity, Vector3 angularVelocity)
Parameters
linearVelocity: Vector3
angularVelocity: Vector3
Returns
void
GrabBegin ()
Signature
virtual void GrabBegin()
Returns
void
GrabEnd ()
Signature
void GrabEnd()
Returns
void
GrabVolumeEnable ( enabled )
Signature
virtual void GrabVolumeEnable(bool enabled)
Parameters
enabled: bool
Returns
void
MoveGrabbedObject ( pos , rot , forceTeleport )
Signature
virtual void MoveGrabbedObject(Vector3 pos, Quaternion rot, bool forceTeleport=false)
Parameters
pos: Vector3
rot: Quaternion
forceTeleport: bool
Returns
void
OffhandGrabbed ( grabbable )
Signature
virtual void OffhandGrabbed(OVRGrabbable grabbable)
Parameters
grabbable: OVRGrabbable
Returns
void
SetPlayerIgnoreCollision ( grabbable , ignore )
Signature
void SetPlayerIgnoreCollision(GameObject grabbable, bool ignore)
Parameters
grabbable: GameObject
ignore: bool
Returns
void
Start ()
Signature
virtual void Start()
Returns
void

Methods

ForceRelease ( grabbable )
Signature
void ForceRelease(OVRGrabbable grabbable)
Parameters
grabbable: OVRGrabbable
Returns
void
Update ()
Signature
virtual void Update()
Returns
void