Skip to content

input: support Vector2 binding inversion - #422

Open
juriyivanov wants to merge 1 commit into
Supreeeme:mainfrom
juriyivanov:fix/vector2-binding-inversion
Open

input: support Vector2 binding inversion#422
juriyivanov wants to merge 1 commit into
Supreeeme:mainfrom
juriyivanov:fix/vector2-binding-inversion

Conversation

@juriyivanov

@juriyivanov juriyivanov commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Add support for per-source Vector2 axis inversion from SteamVR/OpenVR binding
parameters:

"parameters": {
  "invert": "y"
}

Supported values are x, y, and xy for both joystick and trackpad
position bindings.

Bindings without inversion continue to use the existing direct OpenXR
suggested-binding path. Transformed sources use independent backing actions,
so inversion remains isolated by source, interaction profile, and subaction
path, and transformed and direct sources can coexist on the same OpenVR
action.

Vector2 snapshots and deltas are updated from the transformed aggregate during
UpdateActionState, preserving delta semantics across repeated reads and
unread frames.

Motivation

xrizer currently ignores the Vector2 invert parameter in SteamVR/OpenVR
binding JSON. Some application bindings rely on this transform to map physical
controller axes to the coordinates expected by the application.

Related to #149.

Validation

  • cargo fmt --check
  • git diff --check
  • 12 focused Vector2 inversion tests
  • cargo test — 95 unit tests + smoke test
  • cargo +1.97 clippy --workspace --all-targets
  • cargo xbuild --release --features static-openxr --verbose

Runtime hardware test:

  • PICO 4
  • WiVRn OpenXR runtime
  • The Walking Dead: Saints & Sinners
  • Oculus Touch binding using "invert": "y"

Before this change the locomotion Y axis was reversed.
With the patch, forward/backward locomotion is correct on hardware.

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.

1 participant