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

add Gyro #2585

Closed
wants to merge 1 commit into from
Closed

add Gyro #2585

wants to merge 1 commit into from

Conversation

jason90929
Copy link

@jason90929 jason90929 commented Apr 14, 2017

if gyro is disabled(default is enabled), user is only drag to rotate camera, user can't use mobile auto move, like this video demo
it is used for mobile device
https://youtu.be/Yysc7OlDbzw

you can use it and test it on mobile

<a-camera gyro-enabled="false"></a-camera>

@dmarcos
Copy link
Member

dmarcos commented Apr 14, 2017

What happens if the gyro is reenabled? I think probably the orientation would have to be reset so it plays well with mouse panning.

@ngokevin
Copy link
Member

I would leave this out of the default set and recommend tweaking your own controls (taking look-controls and removing the VRControls bits).

@ngokevin
Copy link
Member

I propose to close ^

@dmarcos
Copy link
Member

dmarcos commented Apr 25, 2017

Yeah! The more toggles we have in the core components the more combinations we have to keep track of and QA. It's not hard for someone to copy and customize the controls.

@dmarcos dmarcos closed this Apr 25, 2017
@andreyrd
Copy link
Contributor

andreyrd commented Dec 3, 2019

It's not hard for someone to copy and customize the controls.

It is hard if you can't use webpack / similar build systems. I have to either set up a custom build of aframe or rewrite and paste in the dependencies for look-controls.js.

IMO gyroEnabled is a simple enough toggle that I feel it should be included, especially when toggles for hmdEnabled and touchEnabled exist. It does not need to be on the primitive, but should at least be on the component.

@andreyrd
Copy link
Contributor

andreyrd commented Dec 3, 2019

That said, it seems like hmdEnabled doesn't actually do anything? From what I understand by looking through the code for look-controls, gryo data is written to hmdEuler, so it seems logical that if hmdEnabled == false, it should ignore it.

At the moment all that hmdEnabled seems to do is reset pitch and yaw, but only once in update():

    // Reset pitch and yaw if disabling HMD.
    if (oldData && !data.hmdEnabled && !oldData.hmdEnabled) {
      this.pitchObject.rotation.set(0, 0, 0);
      this.yawObject.rotation.set(0, 0, 0);
    }

Nowhere else is hmdEnabled used in all of look-controls.

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 this pull request may close these issues.

None yet

4 participants