aframevr / aframevr/aframe

Only one steamvr controller visible

Open
#4,042 13 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.