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

Inheritance diagram for OVRGrabber:
OculusSampleFramework.DistanceGrabber

Public Member Functions

void ForceRelease (OVRGrabbable grabbable)
 
virtual void Update ()
 

Public Attributes

float grabBegin = 0.55f
 
float grabEnd = 0.35f
 

Protected Member Functions

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

Protected Attributes

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

Properties

OVRGrabbable grabbedObject [get]
 The currently grabbed object. More...
 

Detailed Description

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

Member Function Documentation

◆ Awake()

virtual void OVRGrabber.Awake ( )
protectedvirtual

◆ CheckForGrabOrRelease()

void OVRGrabber.CheckForGrabOrRelease ( float  prevFlex)
protected

◆ ForceRelease()

void OVRGrabber.ForceRelease ( OVRGrabbable  grabbable)

◆ GrabbableRelease()

void OVRGrabber.GrabbableRelease ( Vector3  linearVelocity,
Vector3  angularVelocity 
)
protected

◆ GrabBegin()

virtual void OVRGrabber.GrabBegin ( )
protectedvirtual

◆ GrabEnd()

void OVRGrabber.GrabEnd ( )
protected

◆ GrabVolumeEnable()

virtual void OVRGrabber.GrabVolumeEnable ( bool  enabled)
protectedvirtual

◆ MoveGrabbedObject()

virtual void OVRGrabber.MoveGrabbedObject ( Vector3  pos,
Quaternion  rot,
bool  forceTeleport = false 
)
protectedvirtual

◆ OffhandGrabbed()

virtual void OVRGrabber.OffhandGrabbed ( OVRGrabbable  grabbable)
protectedvirtual

◆ SetPlayerIgnoreCollision()

void OVRGrabber.SetPlayerIgnoreCollision ( GameObject  grabbable,
bool  ignore 
)
protected

◆ Start()

virtual void OVRGrabber.Start ( )
protectedvirtual

◆ Update()

virtual void OVRGrabber.Update ( )
virtual

Member Data Documentation

◆ grabBegin

float OVRGrabber.grabBegin = 0.55f

◆ grabEnd

float OVRGrabber.grabEnd = 0.35f

◆ m_anchorOffsetPosition

Vector3 OVRGrabber.m_anchorOffsetPosition
protected

◆ m_anchorOffsetRotation

Quaternion OVRGrabber.m_anchorOffsetRotation
protected

◆ m_controller

OVRInput.Controller OVRGrabber.m_controller
protected

◆ m_grabbedObj

OVRGrabbable OVRGrabber.m_grabbedObj = null
protected

◆ m_grabbedObjectPosOff

Vector3 OVRGrabber.m_grabbedObjectPosOff
protected

◆ m_grabbedObjectRotOff

Quaternion OVRGrabber.m_grabbedObjectRotOff
protected

◆ m_grabCandidates

Dictionary<OVRGrabbable, int> OVRGrabber.m_grabCandidates = new Dictionary<OVRGrabbable, int>()
protected

◆ m_grabVolumeEnabled

bool OVRGrabber.m_grabVolumeEnabled = true
protected

◆ m_grabVolumes

Collider [] OVRGrabber.m_grabVolumes = null
protected

◆ m_gripTransform

Transform OVRGrabber.m_gripTransform = null
protected

◆ m_lastPos

Vector3 OVRGrabber.m_lastPos
protected

◆ m_lastRot

Quaternion OVRGrabber.m_lastRot
protected

◆ m_moveHandPosition

bool OVRGrabber.m_moveHandPosition = false
protected

◆ m_operatingWithoutOVRCameraRig

bool OVRGrabber.m_operatingWithoutOVRCameraRig = true
protected

◆ m_parentHeldObject

bool OVRGrabber.m_parentHeldObject = false
protected

◆ m_parentTransform

Transform OVRGrabber.m_parentTransform
protected

◆ m_player

GameObject OVRGrabber.m_player
protected

◆ m_prevFlex

float OVRGrabber.m_prevFlex
protected

Property Documentation

◆ grabbedObject

OVRGrabbable OVRGrabber.grabbedObject
get

The currently grabbed object.


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