VR Interaction Framework  1.0
A vr framework for the Oculus Quest
BNG.GrabbableEvents Class Reference

Override this class to respond to various events that happen to this Grabbable More...

Inheritance diagram for BNG.GrabbableEvents:
BNG.Flashlight BNG.GrabbableHaptics BNG.GrabbableHighlight BNG.GrabbableRingHelper BNG.HandJet BNG.LaserSword BNG.Pistol BNG.Zipline

Public Member Functions

virtual void OnGrab (Grabber grabber)
 Item has been grabbed by a Grabber More...
 
virtual void OnRelease ()
 Has been dropped from the Grabber More...
 
virtual void OnBecomesClosestGrabbable (ControllerHand touchingHand)
 Called if this is the closest grabbable but wasn't in the previous frame More...
 
virtual void OnNoLongerClosestGrabbable (ControllerHand touchingHand)
 No longer closest grabbable. More...
 
virtual void OnBecomesClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this is the closest remote grabbable but wasn't in the previous frame More...
 
virtual void OnNoLongerClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this was the closest remote grabbable last frame, but not this frame More...
 
virtual void OnGrip (float gripValue)
 Amount of Grip (0-1). More...
 
virtual void OnTrigger (float triggerValue)
 Amount of Trigger being held down on the grabbed items controller. More...
 
virtual void OnTriggerDown ()
 Fires if trigger was pressed down on this controller this frame. More...
 
virtual void OnTriggerUp ()
 Fires if trigger was released on this controller this frame. More...
 
virtual void OnButton1 ()
 Button 1 is being held down this frame but not last Oculus : Button 1 = "A" if held in Right controller. More...
 
virtual void OnButton1Down ()
 Button 1 Pressed down this frame Oculus : Button 1 = "A" if held in Right controller. More...
 
virtual void OnButton1Up ()
 Button 1 Released this frame Oculus : Button 1 = "A" if held in Right controller. More...
 
virtual void OnButton2 ()
 Button 2 is being held down this frame but not last Oculus : Button 2 = "B" if held in Right controller. More...
 
virtual void OnButton2Down ()
 Button 2 Pressed down this frame Oculus : Button 2 = "B" if held in Right controller. More...
 
virtual void OnButton2Up ()
 Button 2 Released this frame Oculus : Button 2 = "B" if held in Right controller. More...
 

Protected Attributes

Grabbable grab
 
Grabber thisGrabber
 
InputBridge input
 

Detailed Description

Override this class to respond to various events that happen to this Grabbable

Member Function Documentation

◆ OnBecomesClosestGrabbable()

virtual void BNG.GrabbableEvents.OnBecomesClosestGrabbable ( ControllerHand  touchingHand)
virtual

Called if this is the closest grabbable but wasn't in the previous frame

Parameters
touchingHand

Reimplemented in BNG.GrabbableHighlight, and BNG.GrabbableHaptics.

◆ OnBecomesClosestRemoteGrabbable()

virtual void BNG.GrabbableEvents.OnBecomesClosestRemoteGrabbable ( ControllerHand  touchingHand)
virtual

Fires if this is the closest remote grabbable but wasn't in the previous frame

Parameters
touchingHand

Reimplemented in BNG.GrabbableHighlight, and BNG.GrabbableHaptics.

◆ OnButton1()

virtual void BNG.GrabbableEvents.OnButton1 ( )
virtual

Button 1 is being held down this frame but not last Oculus : Button 1 = "A" if held in Right controller.

"X" if held in Left Controller

Reimplemented in BNG.Zipline.

◆ OnButton1Down()

virtual void BNG.GrabbableEvents.OnButton1Down ( )
virtual

Button 1 Pressed down this frame Oculus : Button 1 = "A" if held in Right controller.

"X" if held in Left Controller

◆ OnButton1Up()

virtual void BNG.GrabbableEvents.OnButton1Up ( )
virtual

Button 1 Released this frame Oculus : Button 1 = "A" if held in Right controller.

"X" if held in Left Controller

◆ OnButton2()

virtual void BNG.GrabbableEvents.OnButton2 ( )
virtual

Button 2 is being held down this frame but not last Oculus : Button 2 = "B" if held in Right controller.

"Y" if held in Left Controller

Reimplemented in BNG.Zipline, and BNG.HandJet.

◆ OnButton2Down()

virtual void BNG.GrabbableEvents.OnButton2Down ( )
virtual

Button 2 Pressed down this frame Oculus : Button 2 = "B" if held in Right controller.

"Y" if held in Left Controller

◆ OnButton2Up()

virtual void BNG.GrabbableEvents.OnButton2Up ( )
virtual

Button 2 Released this frame Oculus : Button 2 = "B" if held in Right controller.

"Y" if held in Left Controller

◆ OnGrab()

virtual void BNG.GrabbableEvents.OnGrab ( Grabber  grabber)
virtual

Item has been grabbed by a Grabber

Parameters
grabber

Reimplemented in BNG.HandJet, BNG.GrabbableHighlight, and BNG.GrabbableHaptics.

◆ OnGrip()

virtual void BNG.GrabbableEvents.OnGrip ( float  gripValue)
virtual

Amount of Grip (0-1).

Only fired if object is being held.

Parameters
gripValue0 - 1 Open / Closed

◆ OnNoLongerClosestGrabbable()

virtual void BNG.GrabbableEvents.OnNoLongerClosestGrabbable ( ControllerHand  touchingHand)
virtual

No longer closest grabbable.

May need to disable highlight, ring, etc.

Parameters
touchingHand

Reimplemented in BNG.GrabbableHighlight.

◆ OnNoLongerClosestRemoteGrabbable()

virtual void BNG.GrabbableEvents.OnNoLongerClosestRemoteGrabbable ( ControllerHand  touchingHand)
virtual

Fires if this was the closest remote grabbable last frame, but not this frame

Parameters
touchingHand

Reimplemented in BNG.GrabbableHighlight.

◆ OnRelease()

virtual void BNG.GrabbableEvents.OnRelease ( )
virtual

Has been dropped from the Grabber

Reimplemented in BNG.HandJet, and BNG.GrabbableHaptics.

◆ OnTrigger()

virtual void BNG.GrabbableEvents.OnTrigger ( float  triggerValue)
virtual

Amount of Trigger being held down on the grabbed items controller.

Only fired if object is being held.

Parameters
triggerValue0 - 1 Open / Closed

Reimplemented in BNG.Pistol, BNG.Zipline, BNG.HandJet, and BNG.Flashlight.

◆ OnTriggerDown()

virtual void BNG.GrabbableEvents.OnTriggerDown ( )
virtual

Fires if trigger was pressed down on this controller this frame.

Only fired if object is being held.

◆ OnTriggerUp()

virtual void BNG.GrabbableEvents.OnTriggerUp ( )
virtual

Fires if trigger was released on this controller this frame.

Only fired if object is being held.

Reimplemented in BNG.HandJet, and BNG.Flashlight.

Member Data Documentation

◆ grab

Grabbable BNG.GrabbableEvents.grab
protected

◆ input

InputBridge BNG.GrabbableEvents.input
protected

◆ thisGrabber

Grabber BNG.GrabbableEvents.thisGrabber
protected

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