FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix cursor component triggering clicks on wrong controller's hovered entity in VR by vincentfretin · Pull Request #5782 · aframevr/aframe · GitHub

Fix cursor component triggering clicks on wrong controller's hovered entity in VR - #5782

Merged
dmarcos merged 1 commit into
aframevr:masterfrom
vincentfretin:fix-cursor-handedness
Dec 19, 2025
Merged

Fix cursor component triggering clicks on wrong controller's hovered entity in VR#5782
dmarcos merged 1 commit into
aframevr:masterfrom
vincentfretin:fix-cursor-handedness

Conversation

vincentfretin commented Dec 17, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

Description:

You can reproduce the issue on https://aframe.io/aframe/examples/showcase/ui/ that is using the laser-controls component.

When using two controllers in VR with laser-controls, the cursor component listens to WebXR session events (selectstart, selectend) which fire globally for any input source. Without filtering by handedness:

  1. Left controller hovers over an image
  2. Right controller hovers over the floor
  3. User presses trigger on right controller
  4. Click event fires on the image (wrong!) because left cursor's intersectedEl was used

Changes proposed:

  • Added hand schema property to cursor component
  • Filter selectstart events in onCursorDown by comparing evt.inputSource.handedness with configured hand
  • Filter selectend events in onCursorUp similarly
  • laser-controls now passes its hand property to the cursor component

PR done with the help of Claude Code with Opus 4.5

dmarcos commented Dec 19, 2025

Copy link
Copy Markdown
Member

Thank you

dmarcos merged commit 0d5e1e2 into aframevr:master Dec 19, 2025
1 check passed
vincentfretin deleted the fix-cursor-handedness branch December 19, 2025 11:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL