Look controls hmdEnabled:false seems to be ignored
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
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 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