galister / wlx-overlay-s

Access your Wayland/X11 desktop from Monado/WiVRn/SteamVR. Now with Vulkan!
GNU General Public License v3.0
100 stars 18 forks source link

DRAFT: OpenXR Playspace Mover #40

Open RinLovesYou opened 2 months ago

RinLovesYou commented 2 months ago

Marked as draft because the monado side has to be cleaned up and expanded before a merge request can be made. I'm putting this here so it's visible to people and we no longer need to pass patches around by hand.

This code interfaces with a custom libmonado function I wrote. The monado changes can be found here

Tries to find libmonado by getting monado-service's location. If this fails, you can run it with LIBMONADO_PATH="path/to/libmonado.so". As the monado side gets cleared up this MR will add integration with libmonado-rs, etc.

I should also mention that inputs have only been mapped for Index controllers, as that's all i have. Take a look at input/openxr changes and let me know where things should be mapped please.

galister commented 1 month ago

for WiVRn users:

diff --git a/src/backend/openxr/input.rs b/src/backend/openxr/input.rs
index bcc2ef3..23a5318 100644
--- a/src/backend/openxr/input.rs
+++ b/src/backend/openxr/input.rs
@@ -380,6 +393,10 @@ fn suggest_bindings(
                 &hands[1].action_move_mouse,
                 instance.string_to_path("/user/hand/right/input/trigger/touch")?,
             ),
+            xr::Binding::new(
+                &hands[0].action_space_drag,
+                instance.string_to_path("/user/hand/left/input/thumbrest/touch")?,
+            ),
             xr::Binding::new(
                 &hands[0].action_haptics,
                 instance.string_to_path("/user/hand/left/output/haptic")?,
galister commented 1 month ago

Nevermind, the find libmonado automatically commit breaks this for WiVRn. can we still have LIBMONADO_PATH to be able to override the behavior specific to monado-service?

ToasterUwU commented 1 month ago

For everyone who wants Vive Tracker FBT and Space drag at the same time: https://gitlab.freedesktop.org/ToasterUwU/monado/-/tree/vive_tracker3

Its just a combination of the vive_tracker3 branch of Babbles Bones Monado Fork and the Monado Fork with Space Drag patch made by @RinLovesYou as mentioned above.

I tested this just now with envision, and both things work perfectly in combination. Im SOOO happy rn!!!

So if you wanna use this combination and use Envision, enter https://gitlab.freedesktop.org/ToasterUwU/monado#vive_tracker3 as your Monado repo and https://gitlab.com/BabbleBones/OpenOVR#htcx-fbt as your OpenComposite repo.

galister commented 1 month ago

cleaned this up here https://github.com/galister/wlx-overlay-s/pull/44 and i will be merging if it works on:

galister commented 4 weeks ago

Monado playspace mover is included in WlxOverlay-S v0.4.0, the patch on the Monado side is still required for it to work.