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

Helper class to interact with physical levers More...

Inheritance diagram for BNG.Lever:

Public Member Functions

virtual void OnLeverChange (float percentage)
 
virtual void OnLeverDown ()
 Lever Moved to down position More...
 
virtual void OnLeverUp ()
 Lever moved to up position More...
 

Public Attributes

AudioClip SwitchOnSound
 
AudioClip SwitchOffSound
 
float MinDegrees = -45f
 Minimum angle the Level can be rotated More...
 
float MaxDegrees = 45f
 Maximum angle the Level can be rotated More...
 
float SwitchTolerance = 1.25f
 Tolerance before considering a switch flipped On or Off Ex : 1.25 Tolerance means switch can be 98.25% up and considered switched on More...
 
float LeverPercentage
 
UnityEvent onLeverDown
 Called when lever was up, but is now in the down position More...
 
UnityEvent onLeverUp
 Called when lever was down, but is now in the up position More...
 
FloatEvent onLeverChange
 Called if the lever changes position at all More...
 

Detailed Description

Helper class to interact with physical levers

Member Function Documentation

◆ OnLeverChange()

virtual void BNG.Lever.OnLeverChange ( float  percentage)
virtual

◆ OnLeverDown()

virtual void BNG.Lever.OnLeverDown ( )
virtual

Lever Moved to down position

◆ OnLeverUp()

virtual void BNG.Lever.OnLeverUp ( )
virtual

Lever moved to up position

Member Data Documentation

◆ LeverPercentage

float BNG.Lever.LeverPercentage

◆ MaxDegrees

float BNG.Lever.MaxDegrees = 45f

Maximum angle the Level can be rotated

◆ MinDegrees

float BNG.Lever.MinDegrees = -45f

Minimum angle the Level can be rotated

◆ onLeverChange

FloatEvent BNG.Lever.onLeverChange

Called if the lever changes position at all

◆ onLeverDown

UnityEvent BNG.Lever.onLeverDown

Called when lever was up, but is now in the down position

◆ onLeverUp

UnityEvent BNG.Lever.onLeverUp

Called when lever was down, but is now in the up position

◆ SwitchOffSound

AudioClip BNG.Lever.SwitchOffSound

◆ SwitchOnSound

AudioClip BNG.Lever.SwitchOnSound

◆ SwitchTolerance

float BNG.Lever.SwitchTolerance = 1.25f

Tolerance before considering a switch flipped On or Off Ex : 1.25 Tolerance means switch can be 98.25% up and considered switched on


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