Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

[Vision Glass] Dynamic realign button #1302

Closed felipeerias closed 8 months ago

felipeerias commented 8 months ago

Add a button to realign the controller and the view.

This button displays a dynamic view of the controller's position in order to better communicate its purpose.

The circle in the button tracks the controller position, tapping the button will reset that position and place the circle in the middle again. This functionality is not implemented in this PR.

felipeerias commented 8 months ago

This is how the button looks like while in use:

https://github.com/Igalia/wolvic/assets/1412060/c16df57d-f023-418b-b29d-e99ed88393a4

svillar commented 8 months ago

I've uploaded #1310 providing API to perform the calibration. You'd just have to add something like

+        mBinding.realignButton.setOnClickListener(v -> {
+            queueRunnable(() -> calibrateController());
+        });

to the UI setup code to perform the calibration when clicking on the realign button.

felipeerias commented 8 months ago

Thank you @svillar, I've updated this PR to use the functionality introduced in https://github.com/Igalia/wolvic/pull/1310

svillar commented 8 months ago

Thank you @svillar, I've updated this PR to use the functionality introduced in #1310

Nice but we need the latter to be reviewed so that CI can work properly