API reference

OVRInputModule Class

Extends PointerInputModule
VR extension of PointerInputModule which supports gaze and controller pointing.

Member Enumerations

Enumeration InputMode

Mouse
No description available
Buttons
No description available

Fields

Transform rayTransform[Get]
OVRCursor m_Cursor[Get]
OVRInput.Button joyPadClickButton[Get]
KeyCode gazeClickKey[Get]
bool performSphereCastForGazepointer[Get]
bool useRightStickScroll[Get]
float rightStickDeadZone[Get]
bool useSwipeScroll[Get]
float swipeDragThreshold[Get]
float swipeDragScale[Get]
bool InvertSwipeXAxis[Get]
OVRRaycaster activeGraphicRaycaster[Get]
float angleDragThreshold[Get]

Properties

InputMode inputMode[Get]
bool allowActivationOnMobileDevice[Get]
float inputActionsPerSecond[Get]
string horizontalAxis[Get]
Name of the horizontal axis for movement (if axis events are used).
string verticalAxis[Get]
Name of the vertical axis for movement (if axis events are used).
string submitButton[Get]
string cancelButton[Get]
static OVRInputModule instance[Get]

Protected Fields

Dictionary< int, OVRPointerEventData > m_VRRayPointerData[Get]

Protected Functions

OVRInputModule ( )
override void Awake ( )
void CopyFromTo
Convenience function for cloning PointerEventData.
Parameters
from
Copy this value
to
to this object
new void CopyFromTo
( PointerEventData @ from,
PointerEventData @ to )
Convenience function for cloning PointerEventData.
Parameters
from
Copy this value
to
to this object
bool GetPointerData
( int id,
bool create )
new void ClearSelection ( )
Clear pointer state for both types of pointer.
virtual MouseState GetMouseStateFromInputSource
( InputSource inputSource,
int id )
Handle inputs from hands and controllers and parse them in a way unity UI can understand.
Returns
virtual MouseState GetMouseStateFromRaycast
( Transform rayOrigin )
State for a pointer controlled by a world space ray.
E.g. gaze pointer
Returns
MouseState GetCanvasPointerData ( )
Get state for pointer which is a pointer moving in world space across the surface of a world space canvas.
Returns
Vector2 SwipeAdjustedPosition
( Vector2 originalPosition,
PointerEventData pointerEvent )
override void ProcessDrag
( PointerEventData pointerEvent )
Exactly the same as the code from PointerInputModule, except that we call our own IsPointerMoving.
This would also not be necessary if PointerEventData.IsPointerMoving was virtual
Parameters
pointerEvent
virtual PointerEventData.FramePressState GetGazeButtonState ( )
Get state of button corresponding to gaze pointer.
Returns
Vector2 GetExtraScrollDelta ( )
Get extra scroll delta from gamepad.
override void OnDestroy ( )

Member Functions

override void UpdateModule ( )
override bool IsModuleSupported ( )
override bool ShouldActivateModule ( )
override void ActivateModule ( )
override void DeactivateModule ( )
override void Process ( )
Process this InputModule.
Same as the StandaloneInputModule version, except that it calls ProcessMouseEvent twice, once for gaze pointers, and once for mouse pointers.

Static Member Functions

static void TrackInputSource
( InputSource hand )
static void UntrackInputSource
( InputSource hand )