Igalia / wolvic

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

[VisionGlass] Fix pointer (aim) orientation #1342

Closed svillar closed 5 months ago

svillar commented 5 months ago

This PR addresses the issues observed in the orientation of the aim (pointer). Among others:

  1. pointer was not usable in multiwindow environment
  2. pointer sometimes started to flicker
  3. sometimes x axis got inverted

Fixes #1341

svillar commented 5 months ago

The behavior in a multi-window context is much better now, although there are still differences with the initial window (moving vertically is slower in the new window.)

The change in the code looks good and it's definitively a step in the right direction, so lets merge it now. We can investigate later the source of the differences and possible improvements, if needed.

Yes I'm aware of that. The problem is that the data we get from the phone is not accurate enough and starts to accumulate errors as you rotate on the Y axis. That's apparently a well known issue for phones (they don't really require that level of accuracy). There are proposals to combine sensor data to improve accuracy (although our current approach already combines accelerometer and gyroscope data) so we could make it better indeed.