Commit graph

36 commits

Author SHA1 Message Date
Ada
4e0649cc74 Fix OpenXR view swimming, increase grip deadzone 2025-05-05 17:48:18 +10:00
Ada
818f6696f4 Stutter fix 2025-05-04 22:00:11 +10:00
Ada
1a26130896 Don't double-destroy session 2025-05-04 22:00:11 +10:00
Ada
2f34081d13 OpenXR cleanup 2, electric boogaloo 2025-05-04 22:00:11 +10:00
Ada
a2dd909ce2 xrNoHandTracking option, tweak offsets for non-vive controllers 2025-05-02 17:02:22 +10:00
Ada
5dc13143c9 a finger-twisting typo 2025-05-01 20:15:14 +10:00
Ada
81996aaeb7 OpenXR hand tracking 2025-05-01 17:19:24 +10:00
Ada
450c5dd09b Primary button for XR controllers without one 2025-04-14 05:59:31 +10:00
Ada
23364f05f8 Use Odyssey controller extension, might fix? 2025-04-14 01:54:10 +10:00
Ada
bd95779fb8 KHR Simple profile typo fix 2025-04-14 01:39:02 +10:00
Ada
29e6f6d07b Trigger click emulation for XR 2025-04-11 04:14:35 +10:00
Ada
d4d46cdbe8 Use OpenXR 1.0, some runtimes don't support 1.1 yet 2025-04-05 23:04:59 +10:00
Ada
8d3a221970 Fix oculus controller path, add index controller bindings 2025-04-05 17:27:30 +10:00
Ada
bfcd52b5dc TODO comments for unimplemented input config functions 2025-04-05 17:20:34 +10:00
Ada
9cf3c748ca Input cleanup, game rate fix 2025-04-02 02:41:08 +10:00
Ada
1b95f97457 OpenXrInputPlugin: Tweak hand offset slightly 2025-04-01 09:04:46 +10:00
Ada
36768b6b88 DeferredFrameTransform: Hack to get lighting working properly in VR
Somewhere, the eye view transform is being applied twice. For now,
this hack with applying an inverse view transform corrects the bugged
lighting in the XR branch.
2025-04-01 09:04:46 +10:00
Ada
7c3fa5b175 OpenXrInputPlugin: Correct HMD-head bone offset 2025-04-01 09:04:46 +10:00
Ada
167c9c433f OpenXrInputPlugin: Adjust hand and head-to-eyes offsets
Hands are now basically perfect (on Vive controllers, at least,
palm pose/grip surface would really help but it's not well supported)
Head now bends properly at the bottom of the head bone and the HMD view
isn't stuck at the bottom of the head bone.

TODO: The current solution doesn't account for avatar scale or the
actual positions of their eyes. The pull-forward offset for the view
might also be too far, I'll need to get feedback on it.
2025-04-01 09:04:46 +10:00
Ada
fedd4c8c1c OpenXrContext: Don't try and fail to initialize on Wayland 2025-04-01 09:04:46 +10:00
Ada
d21dee44fb OpenXrInputPlugin: Oculus touch and WMR controller profiles 2025-04-01 09:04:46 +10:00
Ada
cedc5be526 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-04-01 09:04:46 +10:00
Ada
dc3a508051 OpenXrInputPlugin: Make actions more generic
This still isn't ideal and it uses the Vive controller settings,
but this should work on most controllers thanks to OpenXR's built-in
action remapping and standardised button names.
2025-04-01 09:04:46 +10:00
Ada
7ece6e7a0c OpenXrInputPlugin: Hack for Vive controllers
This aught to be replaced with a proper set of XR input profiles,
at the moment this is *just* enough to get hardcoded button inputs
working with the existing Vive controller config.
2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
760b846bb1 OpenXrDisplayPlugin: Use C++20 std::format. 2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
aa6facf7e6 OpenXrInputPlugin: Use C++20 map iterators. 2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
710da838d8 OpenXr: Use C++20 std::optional. 2025-04-01 09:04:46 +10:00
HifiExperiments
c8557f5c78 OpenXr: Platform improvements.
Add missing includes on Windows.
Include GLX only on Linux.

Move openxr_platform.h include to OpenXrContext.h. To make this
possible, certain names from GLX/X11 need to be undefined in order to be
now includable in OpenXrInput.h.

Add Overte e.V. copyright.

Co-authored-by: Lubosz Sarnecki <lubosz@gmail.com>
2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
661fe08f08 GLMHelpers: Fix build with C++20 on GCC.
When enabling C++20 the lerp function seems to be redefined on GCC (not
on MSVC), don't redefine it using a CMake definition.
2025-04-01 09:04:46 +10:00
05c6a5e5d7 OpenXr: Enable C++20 for OpenXR plugin.
Enabling it globally causes issue with WebRTC.

Co-authored-by: Lubosz Sarnecki <lubosz@gmail.com>
2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
7abc7be287 OpenXrContext: Add Windows platform and bindings. 2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
89ba66c317 OpenXrInputPlugin: Improve haptic feedback mapping. 2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
2db3168612 OpenXrInput: Improve mapping for the Index controller.
* Add thumbstick click and touch.
* Add face and trigger touch.

Use left primary / secondary instead of face button names.
2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
d9cd2fd3d5 OpenGlDisplayPlugin: Add possibility to present frames only once.
Don't present frame more than once in OpenXrDisplayPlugin.
2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
be3e12b18c OpenXrContext: Improve errors when runtime is not available. 2025-04-01 09:04:46 +10:00
Lubosz Sarnecki
473bd4d64e plugins: Add OpenXR plugin.
Add OpenXrDisplayPlugin and OpenXrInputPlugin.
Add controller bindings for the Valve Index controller.
2025-04-01 09:04:46 +10:00