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

Haptic feedback sent to the controller with the focus #1488

Closed javifernandez closed 1 month ago

javifernandez commented 2 months ago

Configuration

Wolvic version: 1.6.1 Wolvic build ID:

Hardware: Quest3

Steps to Reproduce

  1. Enable haptic feedback in the Wovic controller settings dialog
  2. Move the right controller's pointer to enter / leave a widget or panel
  3. Check that the haptic feedback is sent to the right controller
  4. Move the left controller's pointer to enter / leave a widget or panel
  5. Check that the haptic feedback is sent to the right controller
  6. Click on any widget using the left controller
  7. Move the right controller's pointer to enter / leave a widget or panel
  8. Check that the haptic feedback is sent to the left controller
  9. Move the left controller's pointer to enter / leave a widget or panel
  10. Check that the haptic feedback is sent to the left controller

Current Behavior

The haptic feedback is sent always to the controller which performed the last click

Expected Behavior

The haptic feedback is sent to the controller that entered / left a widget or panel

Possible Solution

Context

Error Logs and Stack Traces

``` ```
svillar commented 1 month ago

That happens because we trigger the haptic feedback in the controller that has the focus. In 92f30166 haptic feedback was enabled for hover events without taking into consideration that limitation. There are two options here:

  1. disable haptic feedback for hover events
  2. use the controller id to provide feedback instead of assuming that it's always for the focused one