XR_ANDROID_mouse_interaction OpenXR extension

Name String

XR_ANDROID_mouse_interaction

Extension Type

Instance extension

Registered Extension Number

705

Revision

1

Extension and Version Dependencies

OpenXR 1.0

Last Modified Date

2024-09-06

IP Status

No known IP claims.

Contributors

Sharayu Shenoy, Google

Chiara Coetzee, Google

Levana Chen, Google

Spencer Quin, Google

Overview

This extension provides an XrPath for getting mouse input and defines one commonly used action pose for user mouse profiles, including both mouse devices and trackpad devices.

This extension also introduces a new interaction profile specifically designed for mouse devices to input through the OpenXR action system.

Action pose for mouse interactions

The following action pose (i.e. "aim") enables a 3D pointer ray, whether the tracking inputs are provided by a mouse device or a trackpad device.

The …/input/aim/pose action subpath will be supported on all interaction profiles that are valid for the user path of /user/mouse, including those interaction profiles enabled through extensions.

Aim pose

The …/input/aim/pose is designed for interacting with objects through a mouse pointer in 3D space. For example, using a virtual laser pointer to aim at a virtual button on the wall is an interaction suited to the "aim" pose.

This is the same "aim" pose defined in Standard pose identifiers. Every tracked controller profile already supports this pose.

Example aim pose

Position

The position of the "aim" pose is typically the user's head, that is, the same position of the head when a mouse movement is detected. The aim pose for the mouse is calculated when there is a mouse movement. The last known aim position will be kept until the next mouse movement.

Orientation

The orientation of the "aim" pose may be used to render a 3D pointer ray to interact with a virtual object, for example, clicking a menu button on the wall.

The aim pose for the mouse is calculated when there is a mouse movement. The last known aim orientation will be kept until the next mouse movement.

The -Z direction is the forward direction of the aiming gesture, that is, where the aiming ray is pointing at.

The relative X,Y movement of the mouse is used to compute the relative movement of the mouse along a sphere around the user's head.

Example aim pose

Depth movement will be supported using primary click and scroll. When an action to move in depth is in process, the position is offset from the head position in positive or negative Z-direction along the ray depending on the positive or negative scroll value. The system will stabilize the depth movement within the sphere around the user's head.

The interaction profile for mouse devices

The mouse interaction profile is designed for runtimes which provide mouse inputs using mouse devices or trackpad devices with buttons and scroll. This allows mouse devices and trackpad devices to provide commonly used clicks, scroll, and action pose to the OpenXR action system.

Interaction profile path:

  • /interaction_profiles/android/mouse_interaction

Valid for top level user path:

  • /user/mouse

Supported component paths:

  • …/input/aim/pose
  • …/input/select/click
  • …/input/secondary/click
  • …/input/tertiary/click
  • …/input/scroll/value

This interaction profile supports the action pose described in this section, as well as the following two groups of action inputs.

Click action

This interaction profile supports …/input/select/click, …/input/secondary/click and /input/tertiary/click actions.

The …/input/select/click is a boolean input, where the value XR_TRUE indicates that the primary button on the mouse or trackpad is pressed.

The …/input/secondary/click is a boolean input, where the value XR_TRUE indicates that the secondary button on the mouse or trackpad is pressed.

The …/input/tertiary/click is a boolean input, where the value XR_TRUE indicates that the mouse scroll or the tertiary button is pressed.

Scroll action

This interaction profile supports …/input/scroll/value actions.

The …/input/scroll/value is a 2D input component varying from -1 to 1 to map to scroll down and scroll up.

New Object Types

New Flag Types

New Enum Constants

New Enums

New Structures

New Functions

Issues

Version History

  • Revision 1, 2024-08-29 (Levana Chen)
    • Initial extension description