Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate the enabled flag to controls #414

Closed
vincentfretin opened this issue Jan 21, 2023 · 1 comment · Fixed by #415
Closed

Propagate the enabled flag to controls #414

vincentfretin opened this issue Jan 21, 2023 · 1 comment · Fixed by #415

Comments

@vincentfretin
Copy link
Member

Discussed on WebXR a-frame discord with @jameskane05 because he saw the same issue on Above Par-adowski WebXR Mini-Golf.
On https://aframe-xr-starterkit.glitch.me (github) when I switch from move (movement-controls) to teleport (blink-controls), so effectively setting movement-controls="enabled:false", blink smooth turn or snap turn I don't remember which doesn't work properly because game-controls is actually still active and both components blink-controls and gamepad-controls modify the camera rig rotation.
The enabled:false flag doesn't propagate to the controls, setting gamepad-controls="enabled:false" fixes the issue.
If you don't allow selecting free movement in your experience, you actually don't need gamepad controls so you probably want to list explicitly the controls you want, so if you need only the keyboard controls for desktop, set movement-controls="controls:keyboard"

I think it's fair to expect the enabled flag to be set on all the controls? We should fix that.

@vincentfretin
Copy link
Member Author

I did the changes in #415
No one against it?

Note that even with this changes, if you have both blink-controls and gamepad-controls enabled, it snap turns when you go full on the joystick because of blink-controls and it's clearly not what you want when you move. blink-controls can't currently be disabled, I created an issue jure/aframe-blink-controls#24

vincentfretin added a commit that referenced this issue Jan 25, 2023
* Propagate enabled change to all controls (fix #414)

* Build dist
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 a pull request may close this issue.

1 participant