VR Interaction Framework v2.0
Loading...
Searching...
No Matches
BNG.GrabbableEvents Class Reference

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

Inheritance diagram for BNG.GrabbableEvents:
BNG.AutoGrabGrabbable BNG.Bow BNG.Flashlight BNG.GrabAction BNG.GrabbableBezierLine BNG.GrabbableHaptics BNG.GrabbableHighlight BNG.GrabbableHighlightMaterial BNG.GrabbableRingHelper BNG.GrabbableUnityEvents BNG.GrappleShot BNG.HandJet BNG.HingeHelper BNG.LaserSword BNG.Marker BNG.PlaySoundOnGrab BNG.RaycastWeapon BNG.SteeringWheel BNG.Zipline

Public Member Functions

virtual void OnGrab (Grabber grabber)
 Item has been grabbed by a Grabber.
 
virtual void OnRelease ()
 Has been dropped from the Grabber.
 
virtual void OnBecomesClosestGrabbable (ControllerHand touchingHand)
 Called if this is the closest grabbable but wasn't in the previous frame.
 
virtual void OnBecomesClosestGrabbable (Grabber touchingGrabber)
 Called if this is the closest grabbable but wasn't in the previous frame.
 
virtual void OnNoLongerClosestGrabbable (ControllerHand touchingHand)
 No longer closest grabbable. May need to disable highlight, ring, etc.
 
virtual void OnNoLongerClosestGrabbable (Grabber touchingGrabber)
 No longer closest grabbable. May need to disable highlight, ring, etc.
 
virtual void OnBecomesClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this is the closest remote grabbable but wasn't in the previous frame.
 
virtual void OnBecomesClosestRemoteGrabbable (Grabber theGrabber)
 Fires if this is the closest remote grabbable but wasn't in the previous frame.
 
virtual void OnNoLongerClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this was the closest remote grabbable last frame, but not this frame.
 
virtual void OnNoLongerClosestRemoteGrabbable (Grabber theGrabber)
 Fires if this was the closest remote grabbable last frame, but not this frame.
 
virtual void OnGrip (float gripValue)
 Amount of Grip (0-1). Only fired if object is being held.
 
virtual void OnTrigger (float triggerValue)
 Amount of Trigger being held down on the grabbed items controller. Only fired if object is being held.
 
virtual void OnTriggerDown ()
 Fires if trigger was pressed down on this controller this frame, but was not pressed last frame. Only fired if object is being held.
 
virtual void OnTriggerUp ()
 Fires if Trigger is not held down this frame.
 
virtual void OnButton1 ()
 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.
 
virtual void OnButton1Down ()
 Button 1 Pressed down this frame Oculus : Button 1 = "A" if held in Right controller."X" if held in Left Controller.
 
virtual void OnButton1Up ()
 Button 1 Released this frame Oculus : Button 1 = "A" if held in Right controller."X" if held in Left Controller.
 
virtual void OnButton2 ()
 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.
 
virtual void OnButton2Down ()
 Button 2 Pressed down this frame Oculus : Button 2 = "B" if held in Right controller."Y" if held in Left Controller.
 
virtual void OnButton2Up ()
 Button 2 Released this frame Oculus : Button 2 = "B" if held in Right controller."Y" if held in Left Controller.
 
virtual void OnSnapZoneEnter ()
 Grabbable has been successfully inserted into a SnapZone.
 
virtual void OnSnapZoneExit ()
 Grabbable has been removed from a SnapZone.
 

Protected Member Functions

virtual void Awake ()
 

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

◆ Awake()

virtual void BNG.GrabbableEvents.Awake ( )
protectedvirtual

◆ OnBecomesClosestGrabbable() [1/2]

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.GrabbableHaptics, BNG.GrabbableHighlight, BNG.GrabbableHighlightMaterial, and BNG.GrabbableUnityEvents.

◆ OnBecomesClosestGrabbable() [2/2]

virtual void BNG.GrabbableEvents.OnBecomesClosestGrabbable ( Grabber  touchingGrabber)
virtual

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

Parameters
touchingGrabber

Reimplemented in BNG.GrabbableBezierLine, and BNG.AutoGrabGrabbable.

◆ OnBecomesClosestRemoteGrabbable() [1/2]

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.GrabbableHaptics, BNG.GrabbableHighlight, BNG.GrabbableHighlightMaterial, and BNG.GrabbableUnityEvents.

◆ OnBecomesClosestRemoteGrabbable() [2/2]

virtual void BNG.GrabbableEvents.OnBecomesClosestRemoteGrabbable ( Grabber  theGrabber)
virtual

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

Parameters
theGrabberThe Grabber that this object is valid for

Reimplemented in BNG.GrabbableBezierLine.

◆ 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.GrabbableUnityEvents, and 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.

Reimplemented in BNG.GrabbableUnityEvents.

◆ 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.

Reimplemented in BNG.GrabbableUnityEvents.

◆ 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.GrabbableUnityEvents, and BNG.Zipline.

◆ 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.

Reimplemented in BNG.GrabbableUnityEvents.

◆ 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.

Reimplemented in BNG.GrabbableUnityEvents.

◆ OnGrab()

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

◆ 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

Reimplemented in BNG.GrabbableUnityEvents.

◆ OnNoLongerClosestGrabbable() [1/2]

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, BNG.GrabbableHighlightMaterial, and BNG.GrabbableUnityEvents.

◆ OnNoLongerClosestGrabbable() [2/2]

virtual void BNG.GrabbableEvents.OnNoLongerClosestGrabbable ( Grabber  touchingGrabber)
virtual

No longer closest grabbable. May need to disable highlight, ring, etc.

Parameters
touchingGrabber

Reimplemented in BNG.GrabbableBezierLine.

◆ OnNoLongerClosestRemoteGrabbable() [1/2]

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, BNG.GrabbableHighlightMaterial, and BNG.GrabbableUnityEvents.

◆ OnNoLongerClosestRemoteGrabbable() [2/2]

virtual void BNG.GrabbableEvents.OnNoLongerClosestRemoteGrabbable ( Grabber  theGrabber)
virtual

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

Parameters
theGrabberThe Grabber this object used to be associated with

Reimplemented in BNG.GrabbableBezierLine.

◆ OnRelease()

virtual void BNG.GrabbableEvents.OnRelease ( )
virtual

Has been dropped from the Grabber.

Reimplemented in BNG.GrabbableHaptics, BNG.GrabbableUnityEvents, BNG.HingeHelper, BNG.Bow, BNG.GrappleShot, BNG.HandJet, and BNG.Marker.

◆ OnSnapZoneEnter()

virtual void BNG.GrabbableEvents.OnSnapZoneEnter ( )
virtual

Grabbable has been successfully inserted into a SnapZone.

Reimplemented in BNG.GrabbableUnityEvents.

◆ OnSnapZoneExit()

virtual void BNG.GrabbableEvents.OnSnapZoneExit ( )
virtual

Grabbable has been removed from a SnapZone.

Reimplemented in BNG.GrabbableUnityEvents.

◆ 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.GrabbableUnityEvents, BNG.Flashlight, BNG.GrappleShot, BNG.HandJet, BNG.LaserSword, BNG.Zipline, and BNG.RaycastWeapon.

◆ OnTriggerDown()

virtual void BNG.GrabbableEvents.OnTriggerDown ( )
virtual

Fires if trigger was pressed down on this controller this frame, but was not pressed last frame. Only fired if object is being held.

Reimplemented in BNG.GrabbableUnityEvents.

◆ OnTriggerUp()

virtual void BNG.GrabbableEvents.OnTriggerUp ( )
virtual

Fires if Trigger is not held down this frame.

Reimplemented in BNG.GrabbableUnityEvents, BNG.Flashlight, and BNG.HandJet.

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: