OSVR / OSVR-Core

The core libraries, applications, and plugins of the OSVR software platform.
Apache License 2.0
329 stars 124 forks source link

Configurable recenter hotkey/gesture/button-sequence #553

Open JeroMiya opened 7 years ago

JeroMiya commented 7 years ago

Some headsets drift under normal operation. Typically, this is alleviated through the use of a recenter hotkey (example: holding recenter button in daydream) or compositor menu action (example: recenter menu option in GearVR).

This is a suggestion to add configurable mappings from hotkeys, button-sequences, and maybe gestures(?) to dynamically run reset-yaw via a button press or sequence.

Potential configuration example:

{
  "resetYawHotkeys": {
    "/me/head": {
      "sourceButtonInterface": "/path/to/button/interface"
    },
    "/me/hands/left": {
      "sourceButtonInterfaces": [ "/path/to/button/interface/1", "/path/to/button/interface/2" ]
    }
  }
}

So in the above example, when the user presses the button mapped to "/path/to/button/interface", the server resets yaw on /me/head, effective for all clients (including analysis plugins). When the user presses "/path/to/button/interface/1" and "/path/to/button/interface/2" at the same time, then the server resets yaw for /me/hands/left for all clients (including analysis plugins).

nevalonvr commented 6 years ago

Can you put a EXAMPLE with real project, I dont understand how works relative paths. I have a KinectV2 and my idea is when open the left Hand is reseted the YAW.