3
0
Fork 0
mirror of https://thingvellir.net/git/overte synced 2025-03-27 23:52:03 +01:00
overte-thingvellir/interface/resources/controllers/openxr.json
Ada 6b56354ed0 OpenXrInputPlugin: User-friendly input actions
Replaces the raw controller button inputs with named OpenXR actions.
There's a lot of engine components that expect raw controller inputs
like the VR teleport script. Those will have to be refactored later,
but for now this works well enough and is perfectly usable. A small
issue I've hit is the LY input working for the teleport script,
but not for smooth locomotion. I've hacked around this by having
the "walk" action bound both to LX/LY and to the Translate actions.
It's a bit janky for teleports, but it's functional.

TODO: Feedback on intuitive bindings for other controller types besides
just the HTC Vive controllers.
2025-02-13 08:12:01 +10:00

29 lines
1.4 KiB
JSON

{
"name": "OpenXR Actions",
"channels": [
{ "from": "OpenXR.LeftHand", "to": "Standard.LeftHand" },
{ "from": "OpenXR.RightHand", "to": "Standard.RightHand" },
{ "from": "OpenXR.Head", "to" : "Standard.Head", "when" : [ "Application.InHMD"] },
{ "from": "OpenXR.LeftInteract", "to": "Standard.LT", "filters": [{"type": "deadZone", "min": 0.05}]},
{ "from": "OpenXR.RightInteract", "to": "Standard.RT", "filters": [{"type": "deadZone", "min": 0.05}]},
{ "from": "OpenXR.LeftInteractClick", "to": "Standard.LTClick" },
{ "from": "OpenXR.RightInteractClick", "to": "Standard.RTClick" },
{ "from": "OpenXR.LeftGrip", "to": "Standard.LeftGrip" },
{ "from": "OpenXR.RightGrip", "to": "Standard.RightGrip" },
{ "from": "OpenXR.WalkX", "to": "Actions.TranslateX" },
{ "from": "OpenXR.WalkY", "to": "Actions.TranslateZ" },
{ "from": "OpenXR.WalkX", "peek": true, "to": "Standard.LX" },
{ "from": "OpenXR.WalkY", "peek": true, "to": "Standard.LY" },
{ "from": "OpenXR.Turn", "to": "Standard.RX"},
{ "from": "OpenXR.Teleport", "to": "Standard.RY" },
{ "from": "OpenXR.CycleCamera", "to": "Actions.CycleCamera" },
{ "from": "OpenXR.Sprint", "to": "Actions.Sprint" },
{ "from": "OpenXR.ToggleTablet", "to": "Standard.LeftSecondaryThumb" },
{ "from": "OpenXR.Jump", "to": "Standard.RightSecondaryThumb" }
]
}