aframevr / aframevr/aframe

Look controls hmdEnabled:false seems to be ignored

Open
#4,520 1 comment 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 would expect the configuration enabled: true; hmdEnabled: false; touchEnabled: true; to only take touch input, but gyroscope controls are still enabled. In issue #4095, the look-controls component is entirely disabled. But I would like touch controls to stay enabled while having the ability to toggle on & off gyroscope controls.

The source code for look-controls will reset yaw & pitch when you set hmdEnabled to false, but it will not actually do anything else with that setting, and will still read continue to read and apply data from hmd:
https://github.com/aframevr/aframe/blob/master/src/components/look-controls.js#L79

In past versions, I would rewrite look-controls and implement hmdEnabled myself. Last version I did this for was 0.9.2. If I'm understanding the purpose of hmdEnabled correctly, and this is a bug, I can open a PR for the latest version.

  • A-Frame Version: 1.0.4
  • Platform / Device: iOS 13.3.1 / iPhone 8, Android Chrome 80.0.3987.132 / Android 9 / motorola one zoom
  • Reproducible Code Snippet or URL: https://rust-low-camp.glitch.me

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 in src/components/look-controls.js around line 79 and reproduce the behavior with the linked Glitch example using hmdEnabled:false and touchEnabled:true. Trace how HMD data is read and applied, then verify that gyroscope input is ignored while touch look controls remain enabled.

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
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.