API reference
API reference
Select your platform
No SDKs available
No versions available

Overview

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.PrimaryTouchpad = 0x00000400, 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.SecondaryTouchpad = 0x00000800, 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.
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.LTouchpad = 0x40000000, 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.RTouchpad = unchecked((int)0x80000000), 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.
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.PrimaryThumbRest = 0x00001000, Touch.PrimaryTouchpad = Button.PrimaryTouchpad, Touch.SecondaryIndexTrigger = Button.SecondaryIndexTrigger, Touch.SecondaryThumbstick = Button.SecondaryThumbstick, Touch.SecondaryThumbRest = 0x00100000, Touch.SecondaryTouchpad = Button.SecondaryTouchpad, Touch.Any = ~None
}
Virtual capacitive touch mappings that allow the same input bindings to work across different controllers with capacitive touch support.
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.LThumbRest = 0x00000800, RawTouch.LTouchpad = RawButton.LTouchpad, RawTouch.RIndexTrigger = 0x00000010, RawTouch.RThumbstick = RawButton.RThumbstick, RawTouch.RThumbRest = 0x00000008, RawTouch.RTouchpad = RawButton.RTouchpad, RawTouch.Any = ~None
}
Raw capacitive touch mappings that can be used to directly query the state of a controller.
enum
NearTouch {
}
Virtual near touch mappings that allow the same input bindings to work across different controllers with near touch support.
enum
RawNearTouch {
}
Raw near touch mappings that can be used to directly query the state of a controller.
enum
enum
enum
Axis2D {
}
Virtual 2-dimensional axis (Vector2) mappings that allow the same input bindings to work across different controllers.
enum
RawAxis2D {
}
Raw 2-dimensional axis (Vector2) mappings that can be used to directly query the state of a controller.
enum
OpenVRButton {
}
OpenVR Controller State Enum.
enum
Controller {
Controller.None = OVRPlugin.Controller.None, Controller.LTouch = OVRPlugin.Controller.LTouch, Controller.RTouch = OVRPlugin.Controller.RTouch, Controller.Touch = OVRPlugin.Controller.Touch, Controller.Remote = OVRPlugin.Controller.Remote, Controller.Gamepad = OVRPlugin.Controller.Gamepad, Controller.Hands = OVRPlugin.Controller.Hands, Controller.LHand = OVRPlugin.Controller.LHand, Controller.RHand = OVRPlugin.Controller.RHand, Controller.Active = OVRPlugin.Controller.Active, Controller.All = OVRPlugin.Controller.All
}
Identifies a controller which can be used to query the virtual or raw input state.
enum
Handedness {
Handedness.Unsupported = OVRPlugin.Handedness.Unsupported, Handedness.LeftHanded = OVRPlugin.Handedness.LeftHanded, Handedness.RightHanded = OVRPlugin.Handedness.RightHanded
}
enum
HapticsLocation {
HapticsLocation.None = OVRPlugin.HapticsLocation.None, HapticsLocation.Hand = OVRPlugin.HapticsLocation.Hand, HapticsLocation.Thumb = OVRPlugin.HapticsLocation.Thumb, HapticsLocation.Index = OVRPlugin.HapticsLocation.Index
}
enum
InteractionProfile {
InteractionProfile.None = OVRPlugin.InteractionProfile.None, InteractionProfile.Touch = OVRPlugin.InteractionProfile.Touch, InteractionProfile.TouchPro = OVRPlugin.InteractionProfile.TouchPro, InteractionProfile.TouchPlus = OVRPlugin.InteractionProfile.TouchPlus
}
enum
Hand {
Hand.None = OVRPlugin.Hand.None, Hand.HandLeft = OVRPlugin.Hand.HandLeft, Hand.HandRight = OVRPlugin.Hand.HandRight
}
enum
enum
enum

Static Fields

static readonly float
static readonly float
static List< OVRControllerBase >
static Controller
static Controller
static OVRPlugin.Step
static int

Properties

Static Public Member Functions

static void
Update ( )
Updates the internal state of OVRInput.
static void
Updates the internal physics state of OVRInput.
static OVRInput.InteractionProfile
GetCurrentInteractionProfile
( OVRInput.Hand hand )
Returns the the current interaction profile for a given hand.
static bool
Returns true if the given Controller's orientation is currently tracked.
static bool
Returns true if the given Controller's orientation is currently valid.
static bool
Returns true if the given Controller's position is currently tracked.
static bool
Returns true if the given Controller's position is currently valid.
static bool
AreHandPosesGeneratedByControllerData
( OVRPlugin.Step stepId,
OVRInput.Hand hand )
Returns a flag indicating whether or not the hand poses are controlled by controller data.
static bool
Switch to simultaneous hands and controllers mode on device.
static bool
Switch back from simultaneous hands and controllers mode to the app config-specified mono-modality mode on device.
static ControllerInHandState
GetControllerIsInHandState
( OVRInput.Hand hand )
Returns a flag indicating whether or not the controller is held.
GetActiveControllerForHand
( Handedness handedness )
Gets the active controller type for the given handedness.
static Vector3
Gets the position of the given Controller local to its tracking space.
static Vector3
Gets the linear velocity of the given Controller local to its tracking space.
static Vector3
(Deprecated) Gets the linear acceleration of the given Controller local to its tracking space.
static Quaternion
Gets the rotation of the given Controller local to its tracking space.
static Vector3
Gets the angular velocity of the given Controller local to its tracking space in radians per second around each axis.
static Vector3
(Deprecated) Gets the angular acceleration of the given Controller local to its tracking space in radians per second per second around each axis.
static bool
GetLocalControllerStatesWithoutPrediction
( OVRInput.Controller controllerType,
out Vector3 position,
out Quaternion rotation,
out Vector3 velocity,
out Vector3 angularVelocity )
Gets the current position, rotation and velocity of given Controller local to its tracking space without prediction.
static Handedness
Gets the dominant hand that the user has specified in settings, for mobile devices.
static bool
Get
( Button virtualMask,
Controller controllerMask )
Gets the current state of the given virtual button mask with the given controller mask.
static bool
Get
( RawButton rawMask,
Controller controllerMask )
Gets the current state of the given raw button mask with the given controller mask.
static bool
GetDown
( Button virtualMask,
Controller controllerMask )
Gets the current down state of the given virtual button mask with the given controller mask.
static bool
GetDown
( RawButton rawMask,
Controller controllerMask )
Gets the current down state of the given raw button mask with the given controller mask.
static bool
GetUp
( Button virtualMask,
Controller controllerMask )
Gets the current up state of the given virtual button mask with the given controller mask.
static bool
GetUp
( RawButton rawMask,
Controller controllerMask )
Gets the current up state of the given raw button mask with the given controller mask.
static bool
Get
( Touch virtualMask,
Controller controllerMask )
Gets the current state of the given virtual touch mask with the given controller mask.
static bool
Get
( RawTouch rawMask,
Controller controllerMask )
Gets the current state of the given raw touch mask with the given controller mask.
static bool
GetDown
( Touch virtualMask,
Controller controllerMask )
Gets the current down state of the given virtual touch mask with the given controller mask.
static bool
GetDown
( RawTouch rawMask,
Controller controllerMask )
Gets the current down state of the given raw touch mask with the given controller mask.
static bool
GetUp
( Touch virtualMask,
Controller controllerMask )
Gets the current up state of the given virtual touch mask with the given controller mask.
static bool
GetUp
( RawTouch rawMask,
Controller controllerMask )
Gets the current up state of the given raw touch mask with the given controller mask.
static bool
Get
( NearTouch virtualMask,
Controller controllerMask )
Gets the current state of the given virtual near touch mask with the given controller mask.
static bool
Get
( RawNearTouch rawMask,
Controller controllerMask )
Gets the current state of the given raw near touch mask with the given controller mask.
static bool
GetDown
( NearTouch virtualMask,
Controller controllerMask )
Gets the current down state of the given virtual near touch mask with the given controller mask.
static bool
GetDown
( RawNearTouch rawMask,
Controller controllerMask )
Gets the current down state of the given raw near touch mask with the given controller mask.
static bool
GetUp
( NearTouch virtualMask,
Controller controllerMask )
Gets the current up state of the given virtual near touch mask with the given controller mask.
static bool
GetUp
( RawNearTouch rawMask,
Controller controllerMask )
Gets the current up state of the given raw near touch mask with the given controller mask.
static float
Get
( Axis1D virtualMask,
Controller controllerMask )
Gets the current state of the given virtual 1-dimensional axis mask on the given controller mask.
static float
Get
( RawAxis1D rawMask,
Controller controllerMask )
Gets the current state of the given raw 1-dimensional axis mask on the given controller mask.
static Vector2
Get
( Axis2D virtualMask,
Controller controllerMask )
Gets the current state of the given virtual 2-dimensional axis mask on the given controller mask.
static Vector2
Get
( RawAxis2D rawMask,
Controller controllerMask )
Gets the current state of the given raw 2-dimensional axis mask on the given controller mask.
static Controller
Returns a mask of all currently connected controller types.
static bool
Returns true if the specified controller type is currently connected.
static Controller
Returns the current active controller type.
static void
SetOpenVRLocalPose
( Vector3 leftPos,
Vector3 rightPos,
Quaternion leftRot,
Quaternion rightRot )
Sets OpenVR left and right controller poses local to tracking space.
static string
GetOpenVRStringProperty
( OVR.OpenVR.ETrackedDeviceProperty prop,
uint deviceId )
Accesses OpenVR properties about a given deviceID.
static void
SetControllerVibration
( float frequency,
float amplitude,
Controller controllerMask )
Activates vibration with the given frequency and amplitude with the given controller mask.
static void
SetControllerLocalizedVibration
( HapticsLocation hapticsLocationMask,
float frequency,
float amplitude,
Controller controllerMask )
Activates vibration with the given frequency and amplitude with the given controller mask.
static void
static int
SetControllerHapticsPcm
( HapticsPcmVibration hapticsVibration,
Controller controllerMask )
static float
static byte
Returns the battery percentage remaining for the specified controller.

Details

Member Enumerations

enum OVRInput.Button
Virtual button mappings that allow the same input bindings to work across different controllers.
Enumerator
None
Maps to RawButton: [Gamepad, Touch, LTouch, RTouch, Remote: None].
One
Maps to RawButton: [Gamepad, Touch, RTouch: A], [LTouch: X], [Remote: Start].
Two
Maps to RawButton: [Gamepad, Touch, RTouch: B], [LTouch: Y], [Remote: Back].
Three
Maps to RawButton: [Gamepad, Touch: X], [LTouch, RTouch, Remote: None].
Four
Maps to RawButton: [Gamepad, Touch: Y], [LTouch, RTouch, Remote: None].
Start
Maps to RawButton: [Gamepad: Start], [Touch, LTouch, Remote: Start], [RTouch: None].
Back
Maps to RawButton: [Gamepad, Remote: Back], [Touch, LTouch, RTouch: None].
PrimaryShoulder
Maps to RawButton: [Gamepad: LShoulder], [Touch, LTouch, RTouch, Remote: None].
PrimaryIndexTrigger
Maps to RawButton: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger], [Remote: None].
PrimaryHandTrigger
Maps to RawButton: [Touch, LTouch: LHandTrigger], [RTouch: RHandTrigger], [Gamepad, Remote: None].
PrimaryThumbstick
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstick], [RTouch: RThumbstick], [Remote: None].
PrimaryThumbstickUp
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickUp], [RTouch: RThumbstickUp], [Remote: None].
PrimaryThumbstickDown
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickDown], [RTouch: RThumbstickDown], [Remote: None].
PrimaryThumbstickLeft
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickLeft], [RTouch: RThumbstickLeft], [Remote: None].
PrimaryThumbstickRight
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickRight], [RTouch: RThumbstickRight], [Remote: None].
PrimaryTouchpad
Maps to RawButton: [Gamepad, Touch, LTouch, RTouch, Remote: None].
SecondaryShoulder
Maps to RawButton: [Gamepad: RShoulder], [Touch, LTouch, RTouch, Remote: None].
SecondaryIndexTrigger
Maps to RawButton: [Gamepad, Touch: RIndexTrigger], [LTouch, RTouch, Remote: None].
SecondaryHandTrigger
Maps to RawButton: [Touch: RHandTrigger], [Gamepad, LTouch, RTouch, Remote: None].
SecondaryThumbstick
Maps to RawButton: [Gamepad, Touch: RThumbstick], [LTouch, RTouch, Remote: None].
SecondaryThumbstickUp
Maps to RawButton: [Gamepad, Touch: RThumbstickUp], [LTouch, RTouch, Remote: None].
SecondaryThumbstickDown
Maps to RawButton: [Gamepad, Touch: RThumbstickDown], [LTouch, RTouch, Remote: None].
SecondaryThumbstickLeft
Maps to RawButton: [Gamepad, Touch: RThumbstickLeft], [LTouch, RTouch, Remote: None].
SecondaryThumbstickRight
Maps to RawButton: [Gamepad, Touch: RThumbstickRight], [LTouch, RTouch, Remote: None].
SecondaryTouchpad
Maps to RawButton: [Gamepad, Touch, LTouch, RTouch, Remote: None].
DpadUp
Maps to RawButton: [Gamepad, Remote: DpadUp], [Touch, LTouch, RTouch: None].
DpadDown
Maps to RawButton: [Gamepad, Remote: DpadDown], [Touch, LTouch, RTouch: None].
DpadLeft
Maps to RawButton: [Gamepad, Remote: DpadLeft], [Touch, LTouch, RTouch: None].
DpadRight
Maps to RawButton: [Gamepad, Remote: DpadRight], [Touch, LTouch, RTouch: None].
Up
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickUp], [RTouch: RThumbstickUp], [Remote: DpadUp].
Down
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickDown], [RTouch: RThumbstickDown], [Remote: DpadDown].
Left
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickLeft], [RTouch: RThumbstickLeft], [Remote: DpadLeft].
Right
Maps to RawButton: [Gamepad, Touch, LTouch: LThumbstickRight], [RTouch: RThumbstickRight], [Remote: DpadRight].
Any
Maps to RawButton: [Gamepad, Touch, LTouch, RTouch: Any].
enum OVRInput.RawButton
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, Remote: None].
A
Maps to Physical Button: [Gamepad, Touch, RTouch: A], [LTouch, Remote: None].
B
Maps to Physical Button: [Gamepad, Touch, RTouch: B], [LTouch, Remote: None].
X
Maps to Physical Button: [Gamepad, Touch, LTouch: X], [RTouch, Remote: None].
Y
Maps to Physical Button: [Gamepad, Touch, LTouch: Y], [RTouch, Remote: None].
Start
Maps to Physical Button: [Gamepad, Touch, LTouch, Remote: Start], [RTouch: None].
Back
Maps to Physical Button: [Gamepad, Remote: Back], [Touch, LTouch, RTouch: None].
LShoulder
Maps to Physical Button: [Gamepad: LShoulder], [Touch, LTouch, RTouch, Remote: None].
LIndexTrigger
Maps to Physical Button: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch, Remote: None].
LHandTrigger
Maps to Physical Button: [Touch, LTouch: LHandTrigger], [Gamepad, RTouch, Remote: None].
LThumbstick
Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstick], [RTouch, Remote: None].
LThumbstickUp
Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickUp], [RTouch, Remote: None].
LThumbstickDown
Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickDown], [RTouch, Remote: None].
LThumbstickLeft
Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickLeft], [RTouch, Remote: None].
LThumbstickRight
Maps to Physical Button: [Gamepad, Touch, LTouch: LThumbstickRight], [RTouch, Remote: None].
LTouchpad
Maps to Physical Button: [Gamepad, Touch, LTouch, RTouch, Remote: None].
RShoulder
Maps to Physical Button: [Gamepad: RShoulder], [Touch, LTouch, RTouch, Remote: None].
RIndexTrigger
Maps to Physical Button: [Gamepad, Touch, RTouch: RIndexTrigger], [LTouch, Remote: None].
RHandTrigger
Maps to Physical Button: [Touch, RTouch: RHandTrigger], [Gamepad, LTouch, Remote: None].
RThumbstick
Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstick], [LTouch, Remote: None].
RThumbstickUp
Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickUp], [LTouch, Remote: None].
RThumbstickDown
Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickDown], [LTouch, Remote: None].
RThumbstickLeft
Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickLeft], [LTouch, Remote: None].
RThumbstickRight
Maps to Physical Button: [Gamepad, Touch, RTouch: RThumbstickRight], [LTouch, Remote: None].
RTouchpad
Maps to Physical Button: [Gamepad, Touch, LTouch, RTouch, Remote: None].
DpadUp
Maps to Physical Button: [Gamepad, Remote: DpadUp], [Touch, LTouch, RTouch: None].
DpadDown
Maps to Physical Button: [Gamepad, Remote: DpadDown], [Touch, LTouch, RTouch: None].
DpadLeft
Maps to Physical Button: [Gamepad, Remote: DpadLeft], [Touch, LTouch, RTouch: None].
DpadRight
Maps to Physical Button: [Gamepad, Remote: DpadRight], [Touch, LTouch, RTouch: None].
Any
Maps to Physical Button: [Gamepad, Touch, LTouch, RTouch, Remote: Any].
enum OVRInput.Touch
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, Remote: None].
One
Maps to RawTouch: [Touch, RTouch: A], [LTouch: X], [Gamepad, Remote: None].
Two
Maps to RawTouch: [Touch, RTouch: B], [LTouch: Y], [Gamepad, Remote: None].
Three
Maps to RawTouch: [Touch: X], [Gamepad, LTouch, RTouch, Remote: None].
Four
Maps to RawTouch: [Touch: Y], [Gamepad, LTouch, RTouch, Remote: None].
PrimaryIndexTrigger
Maps to RawTouch: [Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger], [Gamepad, Remote: None].
PrimaryThumbstick
Maps to RawTouch: [Touch, LTouch: LThumbstick], [RTouch: RThumbstick], [Gamepad, Remote: None].
PrimaryThumbRest
Maps to RawTouch: [Touch, LTouch: LThumbRest], [RTouch: RThumbRest], [Gamepad, Remote: None].
PrimaryTouchpad
Maps to RawTouch: [Gamepad, Touch, LTouch, RTouch, Remote: None].
SecondaryIndexTrigger
Maps to RawTouch: [Touch: RIndexTrigger], [Gamepad, LTouch, RTouch, Remote: None].
SecondaryThumbstick
Maps to RawTouch: [Touch: RThumbstick], [Gamepad, LTouch, RTouch, Remote: None].
SecondaryThumbRest
Maps to RawTouch: [Touch: RThumbRest], [Gamepad, LTouch, RTouch, Remote: None].
SecondaryTouchpad
Maps to RawTouch: [Gamepad, Touch, LTouch, RTouch, Remote: None].
Any
Maps to RawTouch: [Touch, LTouch, RTouch: Any], [Gamepad, Remote: None].
enum OVRInput.RawTouch
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, Remote: None].
A
Maps to Physical Touch: [Touch, RTouch: A], [Gamepad, LTouch, Remote: None].
B
Maps to Physical Touch: [Touch, RTouch: B], [Gamepad, LTouch, Remote: None].
X
Maps to Physical Touch: [Touch, LTouch: X], [Gamepad, RTouch, Remote: None].
Y
Maps to Physical Touch: [Touch, LTouch: Y], [Gamepad, RTouch, Remote: None].
LIndexTrigger
Maps to Physical Touch: [Touch, LTouch: LIndexTrigger], [Gamepad, RTouch, Remote: None].
LThumbstick
Maps to Physical Touch: [Touch, LTouch: LThumbstick], [Gamepad, RTouch, Remote: None].
LThumbRest
Maps to Physical Touch: [Touch, LTouch: LThumbRest], [Gamepad, RTouch, Remote: None].
LTouchpad
Maps to Physical Touch: [Gamepad, Touch, LTouch, RTouch, Remote: None].
RIndexTrigger
Maps to Physical Touch: [Touch, RTouch: RIndexTrigger], [Gamepad, LTouch, Remote: None].
RThumbstick
Maps to Physical Touch: [Touch, RTouch: RThumbstick], [Gamepad, LTouch, Remote: None].
RThumbRest
Maps to Physical Touch: [Touch, RTouch: RThumbRest], [Gamepad, LTouch, Remote: None].
RTouchpad
Maps to Physical Touch: [Gamepad, Touch, LTouch, RTouch, Remote: None].
Any
Maps to Physical Touch: [Touch, LTouch, RTouch: Any], [Gamepad, Remote: None].
enum OVRInput.NearTouch
Virtual near touch mappings that allow the same input bindings to work across different controllers with near touch support.
Enumerator
None
Maps to RawNearTouch: [Gamepad, Touch, LTouch, RTouch, Remote: None].
PrimaryIndexTrigger
Maps to RawNearTouch: [Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger], [Gamepad, Remote: None].
PrimaryThumbButtons
Maps to RawNearTouch: [Touch, LTouch: LThumbButtons], [RTouch: RThumbButtons], [Gamepad, Remote: None].
SecondaryIndexTrigger
Maps to RawNearTouch: [Touch: RIndexTrigger], [Gamepad, LTouch, RTouch, Remote: None].
SecondaryThumbButtons
Maps to RawNearTouch: [Touch: RThumbButtons], [Gamepad, LTouch, RTouch, Remote: None].
Any
Maps to RawNearTouch: [Touch, LTouch, RTouch: Any], [Gamepad, Remote: None].
enum OVRInput.RawNearTouch
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, Remote: None].
LIndexTrigger
Maps to Physical NearTouch: [Touch, LTouch: Implies finger is in close proximity to LIndexTrigger.], [Gamepad, RTouch, Remote: None].
LThumbButtons
Maps to Physical NearTouch: [Touch, LTouch: Implies thumb is in close proximity to LThumbstick OR X/Y buttons.], [Gamepad, RTouch, Remote: None].
RIndexTrigger
Maps to Physical NearTouch: [Touch, RTouch: Implies finger is in close proximity to RIndexTrigger.], [Gamepad, LTouch, Remote: None].
RThumbButtons
Maps to Physical NearTouch: [Touch, RTouch: Implies thumb is in close proximity to RThumbstick OR A/B buttons.], [Gamepad, LTouch, Remote: None].
Any
Maps to Physical NearTouch: [Touch, LTouch, RTouch: Any], [Gamepad, Remote: None].
enum OVRInput.Axis1D
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, Remote: None].
PrimaryIndexTrigger
Maps to RawAxis1D: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch: RIndexTrigger], [Remote: None].
PrimaryHandTrigger
Maps to RawAxis1D: [Touch, LTouch: LHandTrigger], [RTouch: RHandTrigger], [Gamepad, Remote: None].
SecondaryIndexTrigger
Maps to RawAxis1D: [Gamepad, Touch: RIndexTrigger], [LTouch, RTouch, Remote: None].
SecondaryHandTrigger
Maps to RawAxis1D: [Touch: RHandTrigger], [Gamepad, LTouch, RTouch, Remote: None].
PrimaryIndexTriggerCurl
= 0x10
PrimaryIndexTriggerSlide
= 0x20
PrimaryThumbRestForce
= 0x40
PrimaryStylusForce
= 0x80
SecondaryIndexTriggerCurl
= 0x100
SecondaryIndexTriggerSlide
= 0x200
SecondaryThumbRestForce
= 0x400
SecondaryStylusForce
= 0x800
PrimaryIndexTriggerForce
= 0x1000
SecondaryIndexTriggerForce
= 0x2000
Any
Maps to RawAxis1D: [Gamepad, Touch, LTouch, RTouch: Any], [Remote: None].
enum OVRInput.RawAxis1D
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, Remote: None].
LIndexTrigger
Maps to Physical Axis1D: [Gamepad, Touch, LTouch: LIndexTrigger], [RTouch, Remote: None].
LHandTrigger
Maps to Physical Axis1D: [Touch, LTouch: LHandTrigger], [Gamepad, RTouch, Remote: None].
RIndexTrigger
Maps to Physical Axis1D: [Gamepad, Touch, RTouch: RIndexTrigger], [LTouch, Remote: None].
RHandTrigger
Maps to Physical Axis1D: [Touch, RTouch: RHandTrigger], [Gamepad, LTouch, Remote: None].
LIndexTriggerCurl
= 0x10
LIndexTriggerSlide
= 0x20
LThumbRestForce
= 0x40
LStylusForce
= 0x80
RIndexTriggerCurl
= 0x100
RIndexTriggerSlide
= 0x200
RThumbRestForce
= 0x400
RStylusForce
= 0x800
LIndexTriggerForce
= 0x1000
RIndexTriggerForce
= 0x2000
Any
Maps to Physical Axis1D: [Gamepad, Touch, LTouch, RTouch: Any], [Remote: None].
enum OVRInput.Axis2D
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, Remote: None].
PrimaryThumbstick
Maps to RawAxis2D: [Gamepad, Touch, LTouch: LThumbstick], [RTouch: RThumbstick], [Remote: None].
PrimaryTouchpad
Maps to RawAxis2D: [Gamepad, Touch, LTouch, RTouch, Remote: None].
SecondaryThumbstick
Maps to RawAxis2D: [Gamepad, Touch: RThumbstick], [LTouch, RTouch, Remote: None].
SecondaryTouchpad
Maps to RawAxis2D: [Gamepad, Touch, LTouch, RTouch, Remote: None].
Any
Maps to RawAxis2D: [Gamepad, Touch, LTouch, RTouch: Any], [Remote: None].
enum OVRInput.RawAxis2D
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, Remote: None].
LThumbstick
Maps to Physical Axis2D: [Gamepad, Touch, LTouch: LThumbstick], [RTouch, Remote: None].
LTouchpad
Maps to Physical Axis2D: [Gamepad, Touch, LTouch, RTouch, Remote: None].
RThumbstick
Maps to Physical Axis2D: [Gamepad, Touch, RTouch: RThumbstick], [LTouch, Remote: None].
RTouchpad
Maps to Physical Axis2D: [Gamepad, Touch, LTouch, RTouch, Remote: None].
Any
Maps to Physical Axis2D: [Gamepad, Touch, LTouch, RTouch: Any], [Remote: None].
enum OVRInput.OpenVRButton
OpenVR Controller State Enum.
Enumerator
None
= 0
Two
= 0x0002
Thumbstick
= 0x100000000
Grip
= 0x0004
enum OVRInput.Controller
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.
Touch
Combined Left/Right pair of Oculus Touch controllers.
Remote
Oculus Remote controller.
Gamepad
Xbox 360 or Xbox One gamepad on PC. Generic gamepad on Android.
Hands
Left Hand provided by hand-tracking.
LHand
Left Hand provided by hand-tracking.
RHand
Right Hand provided by hand-tracking.
Active
Default controller. Represents the controller that most recently registered a button press from the user.
All
Represents the logical OR of all controllers.
enum OVRInput.Handedness
Enumerator
Unsupported
= OVRPlugin.Handedness.Unsupported
LeftHanded
= OVRPlugin.Handedness.LeftHanded
RightHanded
= OVRPlugin.Handedness.RightHanded
enum OVRInput.HapticsLocation
Enumerator
None
= OVRPlugin.HapticsLocation.None
Hand
= OVRPlugin.HapticsLocation.Hand
Thumb
= OVRPlugin.HapticsLocation.Thumb
Index
= OVRPlugin.HapticsLocation.Index
enum OVRInput.InteractionProfile
Enumerator
None
= OVRPlugin.InteractionProfile.None
Touch
= OVRPlugin.InteractionProfile.Touch
TouchPro
= OVRPlugin.InteractionProfile.TouchPro
TouchPlus
= OVRPlugin.InteractionProfile.TouchPlus
enum OVRInput.Hand
Enumerator
None
= OVRPlugin.Hand.None
HandLeft
= OVRPlugin.Hand.HandLeft
HandRight
= OVRPlugin.Hand.HandRight
enum OVRInput.InputDeviceShowState
Enumerator
Always
ControllerInHandOrNoHand
ControllerInHand
ControllerNotInHand
NoHand
enum OVRInput.ControllerInHandState
Enumerator
NoHand
ControllerInHand
ControllerNotInHand
enum OVRInput.OpenVRController
OpenVR Controller Enum.
Enumerator
Unknown
= 0
OculusTouch
= 1
ViveController
= 2
WindowsMRController
= 3

Public Statics

readonly float OVRInput.AXIS_AS_BUTTON_THRESHOLD
No description available.
readonly float OVRInput.AXIS_DEADZONE_THRESHOLD
No description available.
List<OVRControllerBase> OVRInput.controllers
No description available.
Controller OVRInput.activeControllerType
No description available.
Controller OVRInput.connectedControllerTypes
No description available.
OVRPlugin.Step OVRInput.stepType
No description available.
int OVRInput.fixedUpdateCount
No description available.
OpenVRControllerDetails [] OVRInput.openVRControllerDetails
No description available.

Properties

bool OVRInput.pluginSupportsActiveController
No description available.

Static Member Functions

static void OVRInput.Update ( )
Updates the internal state of OVRInput.
Must be called manually if used independently from OVRManager.
static void OVRInput.FixedUpdate ( )
Updates the internal physics state of OVRInput.
Must be called manually if used independently from OVRManager.
static OVRInput.InteractionProfile OVRInput.GetCurrentInteractionProfile
( OVRInput.Hand hand )
Returns the the current interaction profile for a given hand.
This can be used to distinguish between Touch and Touch Pro controllers.
static bool OVRInput.GetControllerOrientationTracked
( OVRInput.Controller controllerType )
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.GetControllerOrientationValid
( OVRInput.Controller controllerType )
Returns true if the given Controller's orientation is currently valid.
Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return false.
static bool OVRInput.GetControllerPositionTracked
( OVRInput.Controller controllerType )
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.GetControllerPositionValid
( OVRInput.Controller controllerType )
Returns true if the given Controller's position is currently valid.
Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return false.
static bool OVRInput.AreHandPosesGeneratedByControllerData
( OVRPlugin.Step stepId,
OVRInput.Hand hand )
Returns a flag indicating whether or not the hand poses are controlled by controller data.
static bool OVRInput.EnableSimultaneousHandsAndControllers ( )
Switch to simultaneous hands and controllers mode on device.
static bool OVRInput.DisableSimultaneousHandsAndControllers ( )
Switch back from simultaneous hands and controllers mode to the app config-specified mono-modality mode on device.
static ControllerInHandState OVRInput.GetControllerIsInHandState
( OVRInput.Hand hand )
Returns a flag indicating whether or not the controller is held.
static OVRInput.Controller OVRInput.GetActiveControllerForHand
( Handedness handedness )
Gets the active controller type for the given handedness.
static Vector3 OVRInput.GetLocalControllerPosition
( OVRInput.Controller controllerType )
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 Vector3 OVRInput.GetLocalControllerVelocity
( OVRInput.Controller controllerType )
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 Vector3 OVRInput.GetLocalControllerAcceleration
( OVRInput.Controller controllerType )
(Deprecated) 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.GetLocalControllerRotation
( OVRInput.Controller controllerType )
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.GetLocalControllerAngularVelocity
( OVRInput.Controller controllerType )
Gets the angular velocity of the given Controller local to its tracking space in radians per second around each axis.
Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
static Vector3 OVRInput.GetLocalControllerAngularAcceleration
( OVRInput.Controller controllerType )
(Deprecated) Gets the angular acceleration of the given Controller local to its tracking space in radians per second per second around each axis.
Only supported for Oculus LTouch and RTouch controllers. Non-tracked controllers will return Vector3.zero.
static bool OVRInput.GetLocalControllerStatesWithoutPrediction
( OVRInput.Controller controllerType,
out Vector3 position,
out Quaternion rotation,
out Vector3 velocity,
out Vector3 angularVelocity )
Gets the current position, rotation and velocity of given Controller local to its tracking space without prediction.
Only supported for Oculus LTouch and RTouch controllers, when using OpenXR backend
static Handedness OVRInput.GetDominantHand ( )
Gets the dominant hand that the user has specified in settings, for mobile devices.
static bool OVRInput.Get
( Button virtualMask,
Controller controllerMask )
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 )
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.GetDown
( Button virtualMask,
Controller controllerMask )
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 )
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.GetUp
( Button virtualMask,
Controller controllerMask )
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 )
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.Get
( Touch virtualMask,
Controller controllerMask )
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 )
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.GetDown
( Touch virtualMask,
Controller controllerMask )
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 )
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.GetUp
( Touch virtualMask,
Controller controllerMask )
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 )
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.Get
( NearTouch virtualMask,
Controller controllerMask )
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 )
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 bool OVRInput.GetDown
( NearTouch virtualMask,
Controller controllerMask )
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 )
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 bool OVRInput.GetUp
( NearTouch virtualMask,
Controller controllerMask )
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 )
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 float OVRInput.Get
( Axis1D virtualMask,
Controller controllerMask )
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 )
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 )
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 )
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.GetConnectedControllers ( )
Returns a mask of all currently connected controller types.
static bool OVRInput.IsControllerConnected
( Controller controller )
Returns true if the specified controller type is currently connected.
static Controller OVRInput.GetActiveController ( )
Returns the current active controller type.
static void OVRInput.SetOpenVRLocalPose
( Vector3 leftPos,
Vector3 rightPos,
Quaternion leftRot,
Quaternion rightRot )
Sets OpenVR left and right controller poses local to tracking space.
static string OVRInput.GetOpenVRStringProperty
( OVR.OpenVR.ETrackedDeviceProperty prop,
uint deviceId )
Accesses OpenVR properties about a given deviceID.
Especially useful for differentiating per type of OpenVR device (i.e. Oculus, Vive)
static void OVRInput.SetControllerVibration
( float frequency,
float amplitude,
Controller controllerMask )
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.SetControllerLocalizedVibration
( HapticsLocation hapticsLocationMask,
float frequency,
float amplitude,
Controller controllerMask )
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.SetControllerHapticsAmplitudeEnvelope
( HapticsAmplitudeEnvelopeVibration hapticsVibration,
Controller controllerMask )
No description available.
static int OVRInput.SetControllerHapticsPcm
( HapticsPcmVibration hapticsVibration,
Controller controllerMask )
No description available.
static float OVRInput.GetControllerSampleRateHz
( Controller controllerMask )
No description available.
static byte OVRInput.GetControllerBatteryPercentRemaining
( Controller controllerMask )
Returns the battery percentage remaining for the specified controller.
Values range from 0 to 100. Only applicable to controllers that report battery level. Returns 0 for controllers that do not report battery level.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon