Only one steamvr controller visible
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
I'm not sure exactly what changed but it seems that now when using steamvr, one controller is always hidden. I've traced this to https://github.com/aframevr/aframe/blob/65952d6133ff23f542e43beb3ae587d66a971c21/src/components/tracked-controls-webvr.js#L107
which relies on a controller being found in https://github.com/aframevr/aframe/blob/bc577c968cf94e78f0706cae99148d254d370eba/src/utils/tracked-controls.js#L115
Because 1 is passed in for filterControllerIndex when looking for the right controller, this causes the condition here: https://github.com/aframevr/aframe/blob/bc577c968cf94e78f0706cae99148d254d370eba/src/utils/tracked-controls.js#L145 to never be true.
The simplest fix I can think of is removing https://github.com/aframevr/aframe/blob/65952d6133ff23f542e43beb3ae587d66a971c21/src/components/tracked-controls-webvr.js#L100 as it seems extraneous (and wrong), though I'm not entirely sure that is the correct fix or not. My suspicion is that the bug where the controller is not found has been around for a while but was made only "visible" because of this commit: https://github.com/aframevr/aframe/commit/7754b2c478369aa4dbe1d8730788d8335ecd2ab8#diff-efa22db2dae70644518618ea4dbfde3e
- A-Frame Version: 0.9.0
- Platform / Device: firefox, steamvr
- Reproducible Code Snippet or URL: reproducible in hubs (hubs.mozilla.com)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the referenced logic in src/components/tracked-controls-webvr.js and src/utils/tracked-controls.js, especially the controller index and filtering lines. Reproduce the issue with Firefox and SteamVR, using the Hubs example if available, and verify that both controllers become visible without breaking controller discovery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100