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

A set of events that allow you to apply haptics to a controller More...

Inheritance diagram for BNG.GrabbableHaptics:
BNG.GrabbableEvents

Public Member Functions

override void OnGrab (Grabber grabber)
 Item has been grabbed by a Grabber More...
 
override void OnRelease ()
 Has been dropped from the Grabber More...
 
override void OnBecomesClosestGrabbable (ControllerHand touchingHand)
 Called if this is the closest grabbable but wasn't in the previous frame More...
 
override void OnBecomesClosestRemoteGrabbable (ControllerHand touchingHand)
 Fires if this is the closest remote grabbable but wasn't in the previous frame More...
 
- Public Member Functions inherited from BNG.GrabbableEvents
virtual void OnNoLongerClosestGrabbable (ControllerHand touchingHand)
 No longer closest grabbable. 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...
 

Public Attributes

bool HapticsOnValidPickup = true
 
bool HapticsOnValidRemotePickup = true
 
bool HapticsOnCollision = true
 
float VibrateFrequency = 0.3f
 
float VibrateAmplitude = 0.1f
 
float VibrateDuration = 0.1f
 

Additional Inherited Members

- Protected Attributes inherited from BNG.GrabbableEvents
Grabbable grab
 
Grabber thisGrabber
 
InputBridge input
 

Detailed Description

A set of events that allow you to apply haptics to a controller

Member Function Documentation

◆ OnBecomesClosestGrabbable()

override void BNG.GrabbableHaptics.OnBecomesClosestGrabbable ( ControllerHand  touchingHand)
virtual

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

Parameters
touchingHand

Reimplemented from BNG.GrabbableEvents.

◆ OnBecomesClosestRemoteGrabbable()

override void BNG.GrabbableHaptics.OnBecomesClosestRemoteGrabbable ( ControllerHand  touchingHand)
virtual

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

Parameters
touchingHand

Reimplemented from BNG.GrabbableEvents.

◆ OnGrab()

override void BNG.GrabbableHaptics.OnGrab ( Grabber  grabber)
virtual

Item has been grabbed by a Grabber

Parameters
grabber

Reimplemented from BNG.GrabbableEvents.

◆ OnRelease()

override void BNG.GrabbableHaptics.OnRelease ( )
virtual

Has been dropped from the Grabber

Reimplemented from BNG.GrabbableEvents.

Member Data Documentation

◆ HapticsOnCollision

bool BNG.GrabbableHaptics.HapticsOnCollision = true

◆ HapticsOnValidPickup

bool BNG.GrabbableHaptics.HapticsOnValidPickup = true

◆ HapticsOnValidRemotePickup

bool BNG.GrabbableHaptics.HapticsOnValidRemotePickup = true

◆ VibrateAmplitude

float BNG.GrabbableHaptics.VibrateAmplitude = 0.1f

◆ VibrateDuration

float BNG.GrabbableHaptics.VibrateDuration = 0.1f

◆ VibrateFrequency

float BNG.GrabbableHaptics.VibrateFrequency = 0.3f

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