![]() |
VR Interaction Framework v2.0
|
A proxy for handling input from various input providers such as OVRInput, XRInput, and SteamVR. More...
Public Member Functions | |
delegate void | InputsUpdatedAction () |
Called after update loop. | |
delegate void | ControllerFoundAction () |
Called once a controller has been successfully detected. | |
virtual void | UpdateInputs () |
virtual void | UpdateSteamInput () |
virtual void | UpdateXRInput () |
virtual void | UpdateUnityInput () |
virtual void | CreateUnityInputActions () |
virtual void | EnableActions () |
virtual void | DisableActions () |
UnityEngine.InputSystem.InputAction | CreateInputAction (string actionName, string binding, bool valueType) |
virtual void | UpdateOVRInput () |
virtual void | UpdatePicoInput () |
virtual void | UpdateDeviceActive () |
bool | GetControllerBindingValue (ControllerBinding val) |
Returns true if the given binding is pressed. | |
bool | GetGrabbedControllerBinding (GrabbedControllerBinding val, ControllerHand hand) |
Vector2 | GetInputAxisValue (InputAxis val) |
virtual bool | GetSupportsXRInput () |
virtual bool | GetSupportsIndexTouch () |
Returns true if the controllers support the 'indexTouch' XR input mapping.Currently only Oculus devices on the Oculus SDK support index touch. OpenVR is not supported. | |
virtual SDKProvider | GetLoadedSDK () |
virtual bool | GetSupportsThumbTouch () |
virtual bool | GetIsOculusDevice () |
virtual bool | GetIsOculusQuest () |
virtual bool | GetIsHTCDevice () |
virtual bool | GetIsPicoDevice () |
InputDevice | GetHMD () |
string | GetHMDName () |
Returns the name of the InputDevice if found. Returns String.empty if not found. | |
Vector3 | GetHMDLocalPosition () |
Quaternion | GetHMDLocalRotation () |
InputDevice | GetLeftController () |
InputDevice | GetRightController () |
Vector3 | GetControllerLocalPosition (ControllerHand handSide) |
Quaternion | GetControllerLocalRotation (ControllerHand handSide) |
virtual ControllerType | GetControllerType () |
Vector3 | GetControllerVelocity (ControllerHand hand) |
Vector3 | GetControllerAngularVelocity (ControllerHand hand) |
virtual string | GetControllerName () |
Get the name of the primary controller. | |
virtual bool | GetIsValveIndexController () |
virtual void | SetTrackingOriginMode (TrackingOriginModeFlags trackingOrigin) |
void | VibrateController (float frequency, float amplitude, float duration, ControllerHand hand) |
Public Attributes | |
XRInputSource | InputSource = XRInputSource.XRInput |
UnityEngine.InputSystem.InputActionAsset | actionSet |
TrackingOriginModeFlags | TrackingOrigin = TrackingOriginModeFlags.Floor |
float | ThumbstickDeadzoneX = 0.001f |
Thumbstick X must be greater than this amount to be considered valid. | |
float | ThumbstickDeadzoneY = 0.001f |
Thumbstick Y must be greater than this amount to be considered valid. | |
float | LeftGrip = 0 |
How far Left Grip is Held down. Values : 0 - 1 (Fully Open / Closed) | |
bool | LeftGripDown = false |
Left Grip was pressed down this frame, but not last. | |
float | RightGrip = 0 |
How far Right Grip is Held down. Values : 0 - 1 (Fully Open / Closed) | |
bool | RightGripDown = false |
Right Grip was pressed down this frame, but not last. | |
float | LeftTrigger = 0 |
How far Left Trigger is Held down. Values : 0 - 1 (Fully Open / Closed) | |
bool | LeftTriggerNear = false |
bool | LeftTriggerUp = false |
bool | LeftTriggerDown = false |
Returns true if Left Trigger was held down this frame but not the last. | |
float | RightTrigger = 0 |
How far Left Trigger is Held down. Values : 0 - 1 (Fully Open / Closed) | |
bool | RightTriggerUp = false |
Returns true if Right Trigger is all the way up this frame but not last. | |
bool | RightTriggerDown = false |
Returns true if Right Trigger was held down this frame but not the last. | |
bool | RightTriggerNear = false |
bool | LeftThumbNear = false |
bool | RightThumbNear = false |
bool | LeftThumbstickDown = false |
Pressed down this frame, but not last. | |
bool | LeftThumbstickUp = false |
Released this frame but not last. | |
bool | RightThumbstickDown = false |
Pressed down this frame, but not last. | |
bool | RightThumbstickUp = false |
Released this frame but not last. | |
bool | LeftThumbstick = false |
Currently Held Down. | |
bool | RightThumbstick = false |
bool | AButton = false |
Is the A button currently being held down. | |
bool | AButtonDown = false |
Returns true if the A Button was pressed down this frame but not last. | |
bool | AButtonUp = false |
bool | BButton = false |
Is the B button currently being held down. | |
bool | BButtonDown = false |
Returns true if the B Button was pressed down this frame but not last. | |
bool | BButtonUp = false |
bool | XButton = false |
bool | XButtonDown = false |
Returns true if the X Button was pressed down this frame but not last. | |
bool | XButtonUp = false |
bool | YButton = false |
bool | YButtonDown = false |
Returns true if the Y Button was pressed down this frame but not last. | |
bool | YButtonUp = false |
bool | StartButton = false |
bool | StartButtonDown = false |
bool | BackButton = false |
bool | BackButtonDown = false |
Vector2 | LeftThumbstickAxis |
Vector2 | RightThumbstickAxis |
Vector2 | LeftTouchPadAxis |
Vector2 | RightTouchPadAxis |
float | LeftThumbCurl = 0f |
float | LeftIndexCurl = 0f |
float | LeftMiddleCurl = 0f |
float | LeftRingCurl = 0f |
float | LeftPinkyCurl = 0f |
float | RightThumbCurl = 0f |
float | RightIndexCurl = 0f |
float | RightMiddleCurl = 0f |
float | RightRingCurl = 0f |
float | RightPinkyCurl = 0f |
ControllerType | ConnectedControllerType |
bool | HMDActive = false |
bool | SupportsBothTouchPadAndJoystick |
Returns true if the controller has both a Touchpad and a Joystick. Currently only the Valve Index has both. | |
bool | SupportsIndexTouch |
Returns true if the controllers support the 'indexTouch' (or 'near trigger') XR input mapping. Currently only Oculus devices on the Oculus SDK support index touch. OpenVR is not supported. | |
bool | SupportsThumbTouch |
Returns true if the controllers support the 'ThumbTouch' (or near thumbstick) XR input mapping. Currently only Oculus devices on the Oculus SDK support index touch. OpenVR is not supported. | |
bool | ShowInputDebugger = false |
Properties | |
static InputBridge | Instance [get] |
Instance of our Singleton. | |
float | DownThreshold [get] |
What threshold constitutes a "down" event. For example, pushing the trigger down 20% (0.2) of the way considered starting a trigger down event This is used in XRInput. | |
SDKProvider | LoadedSDK [get] |
bool | IsOculusDevice [get] |
bool | IsOculusQuest [get] |
bool | IsHTCDevice [get] |
bool | IsPicoDevice [get] |
bool | IsValveIndexController [get] |
Events | |
static InputsUpdatedAction | OnInputsUpdated |
static ControllerFoundAction | OnControllerFound |
A proxy for handling input from various input providers such as OVRInput, XRInput, and SteamVR.
delegate void BNG.InputBridge.ControllerFoundAction | ( | ) |
Called once a controller has been successfully detected.
UnityEngine.InputSystem.InputAction BNG.InputBridge.CreateInputAction | ( | string | actionName, |
string | binding, | ||
bool | valueType | ||
) |
|
virtual |
|
virtual |
|
virtual |
Vector3 BNG.InputBridge.GetControllerAngularVelocity | ( | ControllerHand | hand | ) |
bool BNG.InputBridge.GetControllerBindingValue | ( | ControllerBinding | val | ) |
Returns true if the given binding is pressed.
Vector3 BNG.InputBridge.GetControllerLocalPosition | ( | ControllerHand | handSide | ) |
Quaternion BNG.InputBridge.GetControllerLocalRotation | ( | ControllerHand | handSide | ) |
|
virtual |
Get the name of the primary controller.
|
virtual |
Vector3 BNG.InputBridge.GetControllerVelocity | ( | ControllerHand | hand | ) |
bool BNG.InputBridge.GetGrabbedControllerBinding | ( | GrabbedControllerBinding | val, |
ControllerHand | hand | ||
) |
InputDevice BNG.InputBridge.GetHMD | ( | ) |
Vector3 BNG.InputBridge.GetHMDLocalPosition | ( | ) |
Quaternion BNG.InputBridge.GetHMDLocalRotation | ( | ) |
string BNG.InputBridge.GetHMDName | ( | ) |
Returns the name of the InputDevice if found. Returns String.empty if not found.
Vector2 BNG.InputBridge.GetInputAxisValue | ( | InputAxis | val | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
InputDevice BNG.InputBridge.GetLeftController | ( | ) |
|
virtual |
InputDevice BNG.InputBridge.GetRightController | ( | ) |
|
virtual |
Returns true if the controllers support the 'indexTouch' XR input mapping.Currently only Oculus devices on the Oculus SDK support index touch. OpenVR is not supported.
|
virtual |
|
virtual |
delegate void BNG.InputBridge.InputsUpdatedAction | ( | ) |
Called after update loop.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void BNG.InputBridge.VibrateController | ( | float | frequency, |
float | amplitude, | ||
float | duration, | ||
ControllerHand | hand | ||
) |
bool BNG.InputBridge.AButton = false |
Is the A button currently being held down.
bool BNG.InputBridge.AButtonDown = false |
Returns true if the A Button was pressed down this frame but not last.
bool BNG.InputBridge.AButtonUp = false |
UnityEngine.InputSystem.InputActionAsset BNG.InputBridge.actionSet |
bool BNG.InputBridge.BackButton = false |
bool BNG.InputBridge.BackButtonDown = false |
bool BNG.InputBridge.BButton = false |
Is the B button currently being held down.
bool BNG.InputBridge.BButtonDown = false |
Returns true if the B Button was pressed down this frame but not last.
bool BNG.InputBridge.BButtonUp = false |
ControllerType BNG.InputBridge.ConnectedControllerType |
bool BNG.InputBridge.HMDActive = false |
XRInputSource BNG.InputBridge.InputSource = XRInputSource.XRInput |
float BNG.InputBridge.LeftGrip = 0 |
How far Left Grip is Held down. Values : 0 - 1 (Fully Open / Closed)
bool BNG.InputBridge.LeftGripDown = false |
Left Grip was pressed down this frame, but not last.
float BNG.InputBridge.LeftIndexCurl = 0f |
float BNG.InputBridge.LeftMiddleCurl = 0f |
float BNG.InputBridge.LeftPinkyCurl = 0f |
float BNG.InputBridge.LeftRingCurl = 0f |
float BNG.InputBridge.LeftThumbCurl = 0f |
bool BNG.InputBridge.LeftThumbNear = false |
bool BNG.InputBridge.LeftThumbstick = false |
Currently Held Down.
Vector2 BNG.InputBridge.LeftThumbstickAxis |
bool BNG.InputBridge.LeftThumbstickDown = false |
Pressed down this frame, but not last.
bool BNG.InputBridge.LeftThumbstickUp = false |
Released this frame but not last.
Vector2 BNG.InputBridge.LeftTouchPadAxis |
float BNG.InputBridge.LeftTrigger = 0 |
How far Left Trigger is Held down. Values : 0 - 1 (Fully Open / Closed)
bool BNG.InputBridge.LeftTriggerDown = false |
Returns true if Left Trigger was held down this frame but not the last.
bool BNG.InputBridge.LeftTriggerNear = false |
bool BNG.InputBridge.LeftTriggerUp = false |
float BNG.InputBridge.RightGrip = 0 |
How far Right Grip is Held down. Values : 0 - 1 (Fully Open / Closed)
bool BNG.InputBridge.RightGripDown = false |
Right Grip was pressed down this frame, but not last.
float BNG.InputBridge.RightIndexCurl = 0f |
float BNG.InputBridge.RightMiddleCurl = 0f |
float BNG.InputBridge.RightPinkyCurl = 0f |
float BNG.InputBridge.RightRingCurl = 0f |
float BNG.InputBridge.RightThumbCurl = 0f |
bool BNG.InputBridge.RightThumbNear = false |
bool BNG.InputBridge.RightThumbstick = false |
Vector2 BNG.InputBridge.RightThumbstickAxis |
bool BNG.InputBridge.RightThumbstickDown = false |
Pressed down this frame, but not last.
bool BNG.InputBridge.RightThumbstickUp = false |
Released this frame but not last.
Vector2 BNG.InputBridge.RightTouchPadAxis |
float BNG.InputBridge.RightTrigger = 0 |
How far Left Trigger is Held down. Values : 0 - 1 (Fully Open / Closed)
bool BNG.InputBridge.RightTriggerDown = false |
Returns true if Right Trigger was held down this frame but not the last.
bool BNG.InputBridge.RightTriggerNear = false |
bool BNG.InputBridge.RightTriggerUp = false |
Returns true if Right Trigger is all the way up this frame but not last.
bool BNG.InputBridge.ShowInputDebugger = false |
bool BNG.InputBridge.StartButton = false |
bool BNG.InputBridge.StartButtonDown = false |
bool BNG.InputBridge.SupportsBothTouchPadAndJoystick |
Returns true if the controller has both a Touchpad and a Joystick. Currently only the Valve Index has both.
bool BNG.InputBridge.SupportsIndexTouch |
Returns true if the controllers support the 'indexTouch' (or 'near trigger') XR input mapping. Currently only Oculus devices on the Oculus SDK support index touch. OpenVR is not supported.
bool BNG.InputBridge.SupportsThumbTouch |
Returns true if the controllers support the 'ThumbTouch' (or near thumbstick) XR input mapping. Currently only Oculus devices on the Oculus SDK support index touch. OpenVR is not supported.
float BNG.InputBridge.ThumbstickDeadzoneX = 0.001f |
Thumbstick X must be greater than this amount to be considered valid.
float BNG.InputBridge.ThumbstickDeadzoneY = 0.001f |
Thumbstick Y must be greater than this amount to be considered valid.
TrackingOriginModeFlags BNG.InputBridge.TrackingOrigin = TrackingOriginModeFlags.Floor |
bool BNG.InputBridge.XButton = false |
bool BNG.InputBridge.XButtonDown = false |
Returns true if the X Button was pressed down this frame but not last.
bool BNG.InputBridge.XButtonUp = false |
bool BNG.InputBridge.YButton = false |
bool BNG.InputBridge.YButtonDown = false |
Returns true if the Y Button was pressed down this frame but not last.
bool BNG.InputBridge.YButtonUp = false |
|
get |
What threshold constitutes a "down" event. For example, pushing the trigger down 20% (0.2) of the way considered starting a trigger down event This is used in XRInput.
|
staticget |
Instance of our Singleton.
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
static |
|
static |