Oculus Utilities for Unity 5.x  1.3
Oculus Utilities for Unity Reference Manual
Data Structures | Public Types | Static Public Member Functions
OVRInput Class Reference

Provides a unified input system for Oculus controllers and gamepads. More...

Public Types

enum  Button {
  Button.None = 0, Button.One = 0x00000001, Button.Two = 0x00000002, Button.Three = 0x00000004,
  Button.Four = 0x00000008, Button.Start = 0x00000100, Button.Back = 0x00000200, Button.PrimaryShoulder = 0x00001000,
  Button.PrimaryIndexTrigger = 0x00002000, Button.PrimaryHandTrigger = 0x00004000, Button.PrimaryThumbstick = 0x00008000, Button.PrimaryThumbstickUp = 0x00010000,
  Button.PrimaryThumbstickDown = 0x00020000, Button.PrimaryThumbstickLeft = 0x00040000, Button.PrimaryThumbstickRight = 0x00080000, Button.SecondaryShoulder = 0x00100000,
  Button.SecondaryIndexTrigger = 0x00200000, Button.SecondaryHandTrigger = 0x00400000, Button.SecondaryThumbstick = 0x00800000, Button.SecondaryThumbstickUp = 0x01000000,
  Button.SecondaryThumbstickDown = 0x02000000, Button.SecondaryThumbstickLeft = 0x04000000, Button.SecondaryThumbstickRight = 0x08000000, Button.DpadUp = 0x00000010,
  Button.DpadDown = 0x00000020, Button.DpadLeft = 0x00000040, Button.DpadRight = 0x00000080, Button.Up = 0x10000000,
  Button.Down = 0x20000000, Button.Left = 0x40000000, Button.Right = unchecked((int)0x80000000), Button.Any = ~None
}
 Virtual button mappings that allow the same input bindings to work across different controllers. More...
 
enum  RawButton {
  RawButton.None = 0, RawButton.A = 0x00000001, RawButton.B = 0x00000002, RawButton.X = 0x00000100,
  RawButton.Y = 0x00000200, RawButton.Start = 0x00100000, RawButton.Back = 0x00200000, RawButton.LShoulder = 0x00000800,
  RawButton.LIndexTrigger = 0x10000000, RawButton.LHandTrigger = 0x20000000, RawButton.LThumbstick = 0x00000400, RawButton.LThumbstickUp = 0x00000010,
  RawButton.LThumbstickDown = 0x00000020, RawButton.LThumbstickLeft = 0x00000040, RawButton.LThumbstickRight = 0x00000080, RawButton.RShoulder = 0x00000008,
  RawButton.RIndexTrigger = 0x04000000, RawButton.RHandTrigger = 0x08000000, RawButton.RThumbstick = 0x00000004, RawButton.RThumbstickUp = 0x00001000,
  RawButton.RThumbstickDown = 0x00002000, RawButton.RThumbstickLeft = 0x00004000, RawButton.RThumbstickRight = 0x00008000, RawButton.DpadUp = 0x00010000,
  RawButton.DpadDown = 0x00020000, RawButton.DpadLeft = 0x00040000, RawButton.DpadRight = 0x00080000, RawButton.Any = ~None
}
 Raw button mappings that can be used to directly query the state of a controller. More...
 
enum  Touch {
  Touch.None = 0, Touch.One = Button.One, Touch.Two = Button.Two, Touch.Three = Button.Three,
  Touch.Four = Button.Four, Touch.PrimaryIndexTrigger = Button.PrimaryIndexTrigger, Touch.PrimaryThumbstick = Button.PrimaryThumbstick, Touch.SecondaryIndexTrigger = Button.SecondaryIndexTrigger,
  Touch.SecondaryThumbstick = Button.SecondaryThumbstick, Touch.Any = ~None
}
 Virtual capacitive touch mappings that allow the same input bindings to work across different controllers with capacitive touch support. More...
 
enum  RawTouch {
  RawTouch.None = 0, RawTouch.A = RawButton.A, RawTouch.B = RawButton.B, RawTouch.X = RawButton.X,
  RawTouch.Y = RawButton.Y, RawTouch.LIndexTrigger = 0x00001000, RawTouch.LThumbstick = RawButton.LThumbstick, RawTouch.RIndexTrigger = 0x00000010,
  RawTouch.RThumbstick = RawButton.RThumbstick, RawTouch.Any = ~None
}
 Raw capacitive touch mappings that can be used to directly query the state of a controller. More...
 
enum  NearTouch {
  NearTouch.None = 0, NearTouch.PrimaryIndexTrigger = 0x00000001, NearTouch.PrimaryThumbButtons = 0x00000002, NearTouch.SecondaryIndexTrigger = 0x00000004,
  NearTouch.SecondaryThumbButtons = 0x00000008, NearTouch.Any = ~None
}
 Virtual near touch mappings that allow the same input bindings to work across different controllers with near touch support. More...
 
enum  RawNearTouch {
  RawNearTouch.None = 0, RawNearTouch.LIndexTrigger = 0x00000001, RawNearTouch.LThumbButtons = 0x00000002, RawNearTouch.RIndexTrigger = 0x00000004,
  RawNearTouch.RThumbButtons = 0x00000008, RawNearTouch.Any = ~None
}
 Raw near touch mappings that can be used to directly query the state of a controller. More...
 
enum  Axis1D {
  Axis1D.None = 0, Axis1D.PrimaryIndexTrigger = 0x01, Axis1D.PrimaryHandTrigger = 0x04, Axis1D.SecondaryIndexTrigger = 0x02,
  Axis1D.SecondaryHandTrigger = 0x08, Axis1D.Any = ~None
}
 Virtual 1-dimensional axis (float) mappings that allow the same input bindings to work across different controllers. More...
 
enum  RawAxis1D {
  RawAxis1D.None = 0, RawAxis1D.LIndexTrigger = 0x01, RawAxis1D.LHandTrigger = 0x04, RawAxis1D.RIndexTrigger = 0x02,
  RawAxis1D.RHandTrigger = 0x08, RawAxis1D.Any = ~None
}
 Raw 1-dimensional axis (float) mappings that can be used to directly query the state of a controller. More...
 
enum  Axis2D { Axis2D.None = 0, Axis2D.PrimaryThumbstick = 0x01, Axis2D.SecondaryThumbstick = 0x02, Axis2D.Any = ~None }
 Virtual 2-dimensional axis (Vector2) mappings that allow the same input bindings to work across different controllers. More...
 
enum  RawAxis2D { RawAxis2D.None = 0, RawAxis2D.LThumbstick = 0x01, RawAxis2D.RThumbstick = 0x02, RawAxis2D.Any = ~None }
 Raw 2-dimensional axis (Vector2) mappings that can be used to directly query the state of a controller. More...
 
enum  Controller {
  Controller.None = 0, Controller.LTouch = 0x00000001, Controller.RTouch = 0x00000002, Controller.Remote = 0x00000004,
  Controller.Touch = LTouch | RTouch, Controller.Gamepad = 0x00000008, Controller.Active = unchecked((int)0x80000000), Controller.All = ~None
}
 Identifies a controller which can be used to query the virtual or raw input state. More...
 

Static Public Member Functions

static void Update ()
 Updates the internal state of the OVRInput. More...
 
static bool GetControllerOrientationTracked (OVRInput.Controller controllerType)
 Returns true if the given Controller's orientation is currently tracked. More...
 
static bool GetControllerPositionTracked (OVRInput.Controller controllerType)
 Returns true if the given Controller's position is currently tracked. More...
 
static Vector3 GetLocalControllerPosition (OVRInput.Controller controllerType)
 Gets the position of the given Controller local to its tracking space. More...
 
static Vector3 GetLocalControllerVelocity (OVRInput.Controller controllerType)
 Gets the linear velocity of the given Controller local to its tracking space. More...
 
static Vector3 GetLocalControllerAcceleration (OVRInput.Controller controllerType)
 Gets the linear acceleration of the given Controller local to its tracking space. More...
 
static Quaternion GetLocalControllerRotation (OVRInput.Controller controllerType)
 Gets the rotation of the given Controller local to its tracking space. More...
 
static Quaternion GetLocalControllerAngularVelocity (OVRInput.Controller controllerType)
 Gets the angular velocity of the given Controller local to its tracking space. More...
 
static Quaternion GetLocalControllerAngularAcceleration (OVRInput.Controller controllerType)
 Gets the angular acceleration of the given Controller local to its tracking space. More...
 
static bool Get (Button virtualMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given virtual button mask with the given controller mask. More...
 
static bool Get (RawButton rawMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given raw button mask with the given controller mask. More...
 
static bool GetDown (Button virtualMask, Controller controllerMask=Controller.Active)
 Gets the current down state of the given virtual button mask with the given controller mask. More...
 
static bool GetDown (RawButton rawMask, Controller controllerMask=Controller.Active)
 Gets the current down state of the given raw button mask with the given controller mask. More...
 
static bool GetUp (Button virtualMask, Controller controllerMask=Controller.Active)
 Gets the current up state of the given virtual button mask with the given controller mask. More...
 
static bool GetUp (RawButton rawMask, Controller controllerMask=Controller.Active)
 Gets the current up state of the given raw button mask with the given controller mask. More...
 
static bool Get (Touch virtualMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given virtual touch mask with the given controller mask. More...
 
static bool Get (RawTouch rawMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given raw touch mask with the given controller mask. More...
 
static bool GetDown (Touch virtualMask, Controller controllerMask=Controller.Active)
 Gets the current down state of the given virtual touch mask with the given controller mask. More...
 
static bool GetDown (RawTouch rawMask, Controller controllerMask=Controller.Active)
 Gets the current down state of the given raw touch mask with the given controller mask. More...
 
static bool GetUp (Touch virtualMask, Controller controllerMask=Controller.Active)
 Gets the current up state of the given virtual touch mask with the given controller mask. More...
 
static bool GetUp (RawTouch rawMask, Controller controllerMask=Controller.Active)
 Gets the current up state of the given raw touch mask with the given controller mask. More...
 
static bool Get (NearTouch virtualMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given virtual near touch mask with the given controller mask. More...
 
static bool Get (RawNearTouch rawMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given raw near touch mask with the given controller mask. More...
 
static bool GetDown (NearTouch virtualMask, Controller controllerMask=Controller.Active)
 Gets the current down state of the given virtual near touch mask with the given controller mask. More...
 
static bool GetDown (RawNearTouch rawMask, Controller controllerMask=Controller.Active)
 Gets the current down state of the given raw near touch mask with the given controller mask. More...
 
static bool GetUp (NearTouch virtualMask, Controller controllerMask=Controller.Active)
 Gets the current up state of the given virtual near touch mask with the given controller mask. More...
 
static bool GetUp (RawNearTouch rawMask, Controller controllerMask=Controller.Active)
 Gets the current up state of the given raw near touch mask with the given controller mask. More...
 
static float Get (Axis1D virtualMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given virtual 1-dimensional axis mask on the given controller mask. More...
 
static float Get (RawAxis1D rawMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given raw 1-dimensional axis mask on the given controller mask. More...
 
static Vector2 Get (Axis2D virtualMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given virtual 2-dimensional axis mask on the given controller mask. More...
 
static Vector2 Get (RawAxis2D rawMask, Controller controllerMask=Controller.Active)
 Gets the current state of the given raw 2-dimensional axis mask on the given controller mask. More...
 
static Controller GetConnectedControllers ()
 Returns a mask of all currently connected controller types. More...
 
static Controller GetActiveController ()
 Returns the current active controller type. More...
 
static void SetControllerVibration (float frequency, float amplitude, Controller controllerMask=Controller.Active)
 Activates vibration with the given frequency and amplitude with the given controller mask. More...
 

Detailed Description

Provides a unified input system for Oculus controllers and gamepads.

Member Enumeration Documentation

Virtual 1-dimensional axis (float) mappings that allow the same input bindings to work across different controllers.

Enumerator
None 

Maps to RawAxis1D: [Gamepad, Touch, LTouch, RTouch: None].

PrimaryIndexTrigger 

Maps to RawAxis1D: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger].

PrimaryHandTrigger 

Maps to RawAxis1D: [Gamepad: None], [Touch, LTouch: LHandTrigger], [RTouch: RHandTrigger].

SecondaryIndexTrigger 

Maps to RawAxis1D: [Gamepad, Touch: RIndexTrigger], [LTouch, RTouch: None].

SecondaryHandTrigger 

Maps to RawAxis1D: [Gamepad: None], [Touch: RHandTrigger], [LTouch, RTouch: None].

Any 

Maps to RawAxis1D: [Gamepad, Touch, LTouch, RTouch: Any].

Virtual 2-dimensional axis (Vector2) mappings that allow the same input bindings to work across different controllers.

Enumerator
None 

Maps to RawAxis2D: [Gamepad, Touch, LTouch, RTouch: None].

PrimaryThumbstick 

Maps to RawAxis2D: [Gamepad, Touch, LTouch: LThumbstick], [RTouch: RThumbstick].

SecondaryThumbstick 

Maps to RawAxis2D: [Gamepad, Touch: RThumbstick], [LTouch, RTouch: None].

Any 

Maps to RawAxis2D: [Gamepad, Touch, LTouch, RTouch: Any].

Virtual button mappings that allow the same input bindings to work across different controllers.

Enumerator
None 

Maps to RawButton: [Gamepad, Touch, LTouch, RTouch: None].

One 

Maps to RawButton: [Gamepad, Touch, RTouch: A], [LTouch: X].

Two 

Maps to RawButton: [Gamepad, Touch, RTouch: B], [LTouch: Y].

Three 

Maps to RawButton: [Gamepad, Touch: X], [LTouch, RTouch: None].

Four 

Maps to RawButton: [Gamepad, Touch: Y], [LTouch, RTouch: None].

Start 

Maps to RawButton: [Gamepad: Start], [Touch, LTouch, RTouch: None].

Back 

Maps to RawButton: [Gamepad: Back], [Touch, LTouch, RTouch: None].

PrimaryShoulder 

Maps to RawButton: [Gamepad: LShoulder], [Touch, LTouch, RTouch: None].

PrimaryIndexTrigger 

Maps to RawButton: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger].

PrimaryHandTrigger 

Maps to RawButton: [Gamepad: None], [Touch, LTouch: LHandTrigger], [RTouch: RHandTrigger].

PrimaryThumbstick 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstick], [RTouch: RThumbstick].

PrimaryThumbstickUp 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickUp], [RTouch: RThumbstickUp].

PrimaryThumbstickDown 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickDown], [RTouch: RThumbstickDown].

PrimaryThumbstickLeft 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickLeft], [RTouch: RThumbstickLeft].

PrimaryThumbstickRight 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickRight], [RTouch: RThumbstickRight].

SecondaryShoulder 

Maps to RawButton: [Gamepad: RShoulder], [Touch, LTouch, RTouch: None].

SecondaryIndexTrigger 

Maps to RawButton: [Gamepad, Touch: RIndexTrigger], [LTouch, RTouch: None].

SecondaryHandTrigger 

Maps to RawButton: [Gamepad: None], [Touch: RHandTrigger], [LTouch, RTouch: None].

SecondaryThumbstick 

Maps to RawButton: [Gamepad, Touch: RThumbstick], [LTouch, RTouch: None].

SecondaryThumbstickUp 

Maps to RawButton: [Gamepad, Touch: RThumbstickUp], [LTouch, RTouch: None].

SecondaryThumbstickDown 

Maps to RawButton: [Gamepad, Touch: RThumbstickDown], [LTouch, RTouch: None].

SecondaryThumbstickLeft 

Maps to RawButton: [Gamepad, Touch: RThumbstickLeft], [LTouch, RTouch: None].

SecondaryThumbstickRight 

Maps to RawButton: [Gamepad, Touch: RThumbstickRight], [LTouch, RTouch: None].

DpadUp 

Maps to RawButton: [Gamepad: DpadUp], [Touch, LTouch, RTouch: None].

DpadDown 

Maps to RawButton: [Gamepad: DpadDown], [Touch, LTouch, RTouch: None].

DpadLeft 

Maps to RawButton: [Gamepad: DpadLeft], [Touch, LTouch, RTouch: None].

DpadRight 

Maps to RawButton: [Gamepad: DpadRight], [Touch, LTouch, RTouch: None].

Up 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickUp], [RTouch: RThumbstickUp].

Down 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickDown], [RTouch: RThumbstickDown].

Left 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickLeft], [RTouch: RThumbstickLeft].

Right 

Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickRight], [RTouch: RThumbstickRight].

Any 

Maps to RawButton: [Gamepad, Touch, LTouch, RTouch: Any].

Identifies a controller which can be used to query the virtual or raw input state.

Enumerator
None 

Null controller.

LTouch 

Left Oculus Touch controller. Virtual input mapping differs from the combined L/R Touch mapping.

RTouch 

Right Oculus Touch controller. Virtual input mapping differs from the combined L/R Touch mapping.

Remote 

Oculus Remote controller.

Touch 

Combined Left/Right pair of Oculus Touch controllers.

Gamepad 

Xbox 360 or Xbox One gamepad on PC. Generic gamepad on Android.

Active 

Default controller. Represents the controller that most recently registered a button press from the user.

All 

Represents the logical OR of all controllers.

Virtual near touch mappings that allow the same input bindings to work across different controllers with near touch support.

A near touch uses the capacitive touch sensors of a controller to detect approximate finger proximity prior to a full touch being reported.

Enumerator
None 

Maps to RawNearTouch: [Gamepad, Touch, LTouch, RTouch: None].

PrimaryIndexTrigger 

Maps to RawNearTouch: [Gamepad: None], [Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger].

PrimaryThumbButtons 

Maps to RawNearTouch: [Gamepad: None], [Touch, LTouch: LThumbButtons], [RTouch: RThumbButtons].

SecondaryIndexTrigger 

Maps to RawNearTouch: [Gamepad: None], [Touch: RIndexTrigger], [LTouch, RTouch: None].

SecondaryThumbButtons 

Maps to RawNearTouch: [Gamepad: None], [Touch: RThumbButtons], [LTouch, RTouch: None].

Any 

Maps to RawNearTouch: [Gamepad: None], [Touch, LTouch, RTouch: Any].

Raw 1-dimensional axis (float) mappings that can be used to directly query the state of a controller.

Enumerator
None 

Maps to Physical Axis1D: [Gamepad, Touch, LTouch, RTouch: None].

LIndexTrigger 

Maps to Physical Axis1D: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch: None].

LHandTrigger 

Maps to Physical Axis1D: [Gamepad: None], [Touch, LTouch: LHandTrigger], [RTouch: None].

RIndexTrigger 

Maps to Physical Axis1D: [Gamepad, Touch, RTouch: RIndexTrigger], [LTouch: None].

RHandTrigger 

Maps to Physical Axis1D: [Gamepad: None], [Touch, RTouch: RHandTrigger], [LTouch: None].

Any 

Maps to Physical Axis1D: [Gamepad, Touch, LTouch, RTouch: Any].

Raw 2-dimensional axis (Vector2) mappings that can be used to directly query the state of a controller.

Enumerator
None 

Maps to Physical Axis2D: [Gamepad, Touch, LTouch, RTouch: None].

LThumbstick 

Maps to Physical Axis2D: [Gamepad, Touch, LTouch: LThumbstick], [RTouch: None].

RThumbstick 

Maps to Physical Axis2D: [Gamepad, Touch, RTouch: RThumbstick], [LTouch: None].

Any 

Maps to Physical Axis2D: [Gamepad, Touch, LTouch, RTouch: Any].

Raw button mappings that can be used to directly query the state of a controller.

Enumerator
None 

Maps to Physical Button: [Gamepad, Touch, LTouch, RTouch: None].

Maps to Physical Button: [Gamepad, Touch, RTouch: A], [LTouch: None].

Maps to Physical Button: [Gamepad, Touch, RTouch: B], [LTouch: None].

Maps to Physical Button: [Gamepad, Touch, LTouch: X], [RTouch: None].

Maps to Physical Button: [Gamepad, Touch, LTouch: Y], [RTouch: None].

Start 

Maps to Physical Button: [Gamepad: Start], [Touch, LTouch, RTouch: None].

Back 

Maps to Physical Button: [Gamepad: Back], [Touch, LTouch, RTouch: None].

LShoulder 

Maps to Physical Button: [Gamepad: LShoulder], [Touch, LTouch, RTouch: None].

LIndexTrigger 

Maps to Physical Button: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch: None].

LHandTrigger 

Maps to Physical Button: [Gamepad: None], [Touch, LTouch: LHandTrigger], [RTouch: None].

LThumbstick 

Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstick], [RTouch: None].

LThumbstickUp 

Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickUp], [RTouch: None].

LThumbstickDown 

Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickDown], [RTouch: None].

LThumbstickLeft 

Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickLeft], [RTouch: None].

LThumbstickRight 

Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickRight], [RTouch: None].

RShoulder 

Maps to Physical Button: [Gamepad: RShoulder], [Touch, LTouch, RTouch: None].

RIndexTrigger 

Maps to Physical Button: [Gamepad, Touch, RTouch: RIndexTrigger], [LTouch: None].

RHandTrigger 

Maps to Physical Button: [Gamepad: None], [Touch, RTouch: RHandTrigger], [LTouch: None].

RThumbstick 

Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstick], [LTouch: None].

RThumbstickUp 

Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickUp], [LTouch: None].

RThumbstickDown 

Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickDown], [LTouch: None].

RThumbstickLeft 

Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickLeft], [LTouch: None].

RThumbstickRight 

Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickRight], [LTouch: None].

DpadUp 

Maps to Physical Button: [Gamepad: DpadUp], [Touch, LTouch, RTouch: None].

DpadDown 

Maps to Physical Button: [Gamepad: DpadDown], [Touch, LTouch, RTouch: None].

DpadLeft 

Maps to Physical Button: [Gamepad: DpadLeft], [Touch, LTouch, RTouch: None].

DpadRight 

Maps to Physical Button: [Gamepad: DpadRight], [Touch, LTouch, RTouch: None].

Any 

Maps to Physical Button: [Gamepad, Touch, LTouch, RTouch: Any].

Raw near touch mappings that can be used to directly query the state of a controller.

Enumerator
None 

Maps to Physical NearTouch: [Gamepad, Touch, LTouch, RTouch: None].

LIndexTrigger 

Maps to Physical NearTouch: [Gamepad: None], Implies finger is in close proximity to LIndexTrigger.

LThumbButtons 

Maps to Physical NearTouch: [Gamepad: None], Implies thumb is in close proximity to LThumbstick OR X/Y buttons.

RIndexTrigger 

Maps to Physical NearTouch: [Gamepad: None], Implies finger is in close proximity to RIndexTrigger.

RThumbButtons 

Maps to Physical NearTouch: [Gamepad: None], Implies thumb is in close proximity to RThumbstick OR A/B buttons.

Any 

Maps to Physical NearTouch: [Gamepad: None], [Touch, LTouch, RTouch: Any].

Raw capacitive touch mappings that can be used to directly query the state of a controller.

Enumerator
None 

Maps to Physical Touch: [Gamepad, Touch, LTouch, RTouch: None].

Maps to Physical Touch: [Gamepad: None], [Touch, RTouch: A], [LTouch: None].

Maps to Physical Touch: [Gamepad: None], [Touch, RTouch: B], [LTouch: None].

Maps to Physical Touch: [Gamepad: None], [Touch, LTouch: X], [RTouch: None].

Maps to Physical Touch: [Gamepad: None], [Touch, LTouch: Y], [RTouch: None].

LIndexTrigger 

Maps to Physical Touch: [Gamepad: None], [Touch, LTouch: LIndexTrigger], [RTouch: None].

LThumbstick 

Maps to Physical Touch: [Gamepad: None], [Touch, LTouch: LThumbstick], [RTouch: None].

RIndexTrigger 

Maps to Physical Touch: [Gamepad: None], [Touch, RTouch: RIndexTrigger], [LTouch: None].

RThumbstick 

Maps to Physical Touch: [Gamepad: None], [Touch, RTouch: RThumbstick], [LTouch: None].

Any 

Maps to Physical Touch: [Gamepad: None], [Touch, LTouch, RTouch: Any].

Virtual capacitive touch mappings that allow the same input bindings to work across different controllers with capacitive touch support.

Enumerator
None 

Maps to RawTouch: [Gamepad, Touch, LTouch, RTouch: None].

One 

Maps to RawTouch: [Gamepad: None], [Touch, RTouch: A], [LTouch: X].

Two 

Maps to RawTouch: [Gamepad: None], [Touch, RTouch: B], [LTouch: Y].

Three 

Maps to RawTouch: [Gamepad: None], [Touch: X], [LTouch, RTouch: None].

Four 

Maps to RawTouch: [Gamepad: None], [Touch: Y], [LTouch, RTouch: None].

PrimaryIndexTrigger 

Maps to RawTouch: [Gamepad: None], [Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger].

PrimaryThumbstick 

Maps to RawTouch: [Gamepad: None], [Touch, LTouch: LThumbstick], [RTouch: RThumbstick].

SecondaryIndexTrigger 

Maps to RawTouch: [Gamepad: None], [Touch: RIndexTrigger], [LTouch, RTouch: None].

SecondaryThumbstick 

Maps to RawTouch: [Gamepad: None], [Touch: RThumbstick], [LTouch, RTouch: None].

Any 

Maps to RawTouch: [Gamepad: None], [Touch, LTouch, RTouch: Any].

Member Function Documentation

static bool OVRInput.Get ( Button  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given virtual button mask with the given controller mask.

Returns true if any masked button is down on any masked controller.

static bool OVRInput.Get ( RawButton  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given raw button mask with the given controller mask.

Returns true if any masked button is down on any masked controllers.

static bool OVRInput.Get ( Touch  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given virtual touch mask with the given controller mask.

Returns true if any masked touch is down on any masked controller.

static bool OVRInput.Get ( RawTouch  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given raw touch mask with the given controller mask.

Returns true if any masked touch is down on any masked controllers.

static bool OVRInput.Get ( NearTouch  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given virtual near touch mask with the given controller mask.

Returns true if any masked near touch is down on any masked controller.

static bool OVRInput.Get ( RawNearTouch  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given raw near touch mask with the given controller mask.

Returns true if any masked near touch is down on any masked controllers.

static float OVRInput.Get ( Axis1D  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given virtual 1-dimensional axis mask on the given controller mask.

Returns the value of the largest masked axis across all masked controllers. Values range from 0 to 1.

static float OVRInput.Get ( RawAxis1D  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given raw 1-dimensional axis mask on the given controller mask.

Returns the value of the largest masked axis across all masked controllers. Values range from 0 to 1.

static Vector2 OVRInput.Get ( Axis2D  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given virtual 2-dimensional axis mask on the given controller mask.

Returns the vector of the largest masked axis across all masked controllers. Values range from -1 to 1.

static Vector2 OVRInput.Get ( RawAxis2D  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current state of the given raw 2-dimensional axis mask on the given controller mask.

Returns the vector of the largest masked axis across all masked controllers. Values range from -1 to 1.

static Controller OVRInput.GetActiveController ( )
static

Returns the current active controller type.

static Controller OVRInput.GetConnectedControllers ( )
static

Returns a mask of all currently connected controller types.

static bool OVRInput.GetControllerOrientationTracked ( OVRInput.Controller  controllerType)
static

Returns true if the given Controller's orientation is currently tracked.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return false.

static bool OVRInput.GetControllerPositionTracked ( OVRInput.Controller  controllerType)
static

Returns true if the given Controller's position is currently tracked.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return false.

static bool OVRInput.GetDown ( Button  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current down state of the given virtual button mask with the given controller mask.

Returns true if any masked button was pressed this frame on any masked controller and no masked button was previously down last frame.

static bool OVRInput.GetDown ( RawButton  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current down state of the given raw button mask with the given controller mask.

Returns true if any masked button was pressed this frame on any masked controller and no masked button was previously down last frame.

static bool OVRInput.GetDown ( Touch  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current down state of the given virtual touch mask with the given controller mask.

Returns true if any masked touch was pressed this frame on any masked controller and no masked touch was previously down last frame.

static bool OVRInput.GetDown ( RawTouch  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current down state of the given raw touch mask with the given controller mask.

Returns true if any masked touch was pressed this frame on any masked controller and no masked touch was previously down last frame.

static bool OVRInput.GetDown ( NearTouch  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current down state of the given virtual near touch mask with the given controller mask.

Returns true if any masked near touch was pressed this frame on any masked controller and no masked near touch was previously down last frame.

static bool OVRInput.GetDown ( RawNearTouch  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current down state of the given raw near touch mask with the given controller mask.

Returns true if any masked near touch was pressed this frame on any masked controller and no masked near touch was previously down last frame.

static Vector3 OVRInput.GetLocalControllerAcceleration ( OVRInput.Controller  controllerType)
static

Gets the linear acceleration of the given Controller local to its tracking space.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.

static Quaternion OVRInput.GetLocalControllerAngularAcceleration ( OVRInput.Controller  controllerType)
static

Gets the angular acceleration of the given Controller local to its tracking space.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity.

static Quaternion OVRInput.GetLocalControllerAngularVelocity ( OVRInput.Controller  controllerType)
static

Gets the angular velocity of the given Controller local to its tracking space.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity.

static Vector3 OVRInput.GetLocalControllerPosition ( OVRInput.Controller  controllerType)
static

Gets the position of the given Controller local to its tracking space.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.

static Quaternion OVRInput.GetLocalControllerRotation ( OVRInput.Controller  controllerType)
static

Gets the rotation of the given Controller local to its tracking space.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Quaternion.identity.

static Vector3 OVRInput.GetLocalControllerVelocity ( OVRInput.Controller  controllerType)
static

Gets the linear velocity of the given Controller local to its tracking space.

Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.

static bool OVRInput.GetUp ( Button  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current up state of the given virtual button mask with the given controller mask.

Returns true if any masked button was released this frame on any masked controller and no other masked button is still down this frame.

static bool OVRInput.GetUp ( RawButton  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current up state of the given raw button mask with the given controller mask.

Returns true if any masked button was released this frame on any masked controller and no other masked button is still down this frame.

static bool OVRInput.GetUp ( Touch  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current up state of the given virtual touch mask with the given controller mask.

Returns true if any masked touch was released this frame on any masked controller and no other masked touch is still down this frame.

static bool OVRInput.GetUp ( RawTouch  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current up state of the given raw touch mask with the given controller mask.

Returns true if any masked touch was released this frame on any masked controller and no other masked touch is still down this frame.

static bool OVRInput.GetUp ( NearTouch  virtualMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current up state of the given virtual near touch mask with the given controller mask.

Returns true if any masked near touch was released this frame on any masked controller and no other masked near touch is still down this frame.

static bool OVRInput.GetUp ( RawNearTouch  rawMask,
Controller  controllerMask = Controller.Active 
)
static

Gets the current up state of the given raw near touch mask with the given controller mask.

Returns true if any masked near touch was released this frame on any masked controller and no other masked near touch is still down this frame.

static void OVRInput.SetControllerVibration ( float  frequency,
float  amplitude,
Controller  controllerMask = Controller.Active 
)
static

Activates vibration with the given frequency and amplitude with the given controller mask.

Ignored on controllers that do not support vibration. Expected values range from 0 to 1.

static void OVRInput.Update ( )
static

Updates the internal state of the OVRInput.

Must be called manually if used independently from OVRManager.


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