Skip to content

fix(steamvr): take SteamVR's own grip offset off Touch controllers - #10

Merged
aaf2tbz merged 2 commits into
metalsharp:mainfrom
multision:fix/steamvr-touch-grip-offset
Nov 18, 2026
Merged

aaf2tbz merged 2 commits into
metalsharp:mainfrom
multision:fix/steamvr-touch-grip-offset

Conversation

@multision

Copy link
Copy Markdown
Contributor

Summary

With Quest 3 controllers in SteamVR, wrist rotation was slightly off.

To give SteamVR the Touch controllers' own frame, the driver takes the grip offset off ALVR's grip pose: 60° about x, at (0, -0.032, 0.040). SteamVR's render models for every Touch controller (oculus_cv1_controller, oculus_rifts_controller, oculus_quest2_controller, oculus_quest_plus_controller, oculus_quest_pro_controller) put their openxr_grip component 20.6° about x from that frame, at (±0.007, -0.0018, 0.102) with x mirrored for the right hand, and SteamVR rebuilds the grip from it. The 60° is the angle between openxr_grip (20.6°) and openxr_aim (-39.4°), so SteamVR's grip ended up about 39° from the one the headset reported.

The driver now takes off SteamVR's own openxr_grip transform, so an application gets back the grip the headset sent. Only the Touch family changes; Lighthouse controllers already report their own frame.

Testing

  • Built for macOS and for Windows (build/native, build/win64): not run, no CMake or Ninja on this Mac. steamvr/driver_metalvr.dll was built with x86_64-w64-mingw32-g++ 16.2 from the CMake target's sources, include paths and flags (C++20, -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers, static runtime): 0 warnings, as on main. CI covers the full builds.

  • scripts/test-native.sh and scripts/test-failures.sh: not run. They do not reach the SteamVR driver, and tests/ has no harness for it yet, so this change has no automated check; happy to add one if there is a preferred shape for it.

  • scripts/test-wine.sh: not run.

  • scripts/test-openvr.sh: not run (this is the SteamVR driver, not the OpenComposite path).

  • On a headset: Meta Quest 3 over Wi-Fi with the ALVR client, metalvrd from the v0.2.1 release (ALVR server v20.14.1), SteamVR 2.18.4 on MetalSharp Wine 8.0 (Wine 11.17, x86_64 under Rosetta), Apple silicon Mac, macOS 27. Tried in SteamVR Home and Blade & Sorcery.

    Before: wrist rotation was slightly off. After: it matched the real controllers.

Checklist

  • The change is my own work, or open-source code whose license allows it here; nothing is taken from a closed-source product
  • Changes to ALVR or OpenComposite are patches under patches/, not edits in external/
  • New downloads are pinned to a commit
  • Documentation is updated where behaviour, options or the protocol change (no documented behaviour changes)
  • No Wine prefixes, logs with personal paths, or other personal data

SteamVR's render models for every Touch controller (CV1, Rift S, Quest 2,
Touch Plus and Touch Pro) put their openxr_grip component 20.6 degrees about x
from the controller's frame, at +-0.007, -0.0018, 0.102 (x mirrored for the
right hand), and SteamVR's OpenXR rebuilds the grip from it. The driver took
60 degrees off instead, which is the angle between openxr_grip and openxr_aim
(-39.4), so SteamVR's controllers sat tilted and offset from the grip the
headset reported, which showed as wrong wrist rotation.
@multision
multision requested a review from aaf2tbz as a code owner November 18, 2026 20:10
@aaf2tbz
aaf2tbz merged commit d265061 into metalsharp:main Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants