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

Controller events being emitted double (e.g., vive-controls gripup) #2379

Closed
ngokevin opened this issue Feb 13, 2017 · 5 comments
Closed

Controller events being emitted double (e.g., vive-controls gripup) #2379

ngokevin opened this issue Feb 13, 2017 · 5 comments

Comments

@ngokevin
Copy link
Member

Description:

  1. Add an event listener to a controller (gripup) in the showcase/tracked-controls example.
  2. Add a console.log in the event listener.
  3. Open the scene and press the button.

See the log shows up twice.

  • A-Frame Version: 0.5.0
  • Platform / Device: Vive / Windows / FF Nightly
@ngokevin ngokevin added the bug label Feb 13, 2017
@machenmusik
Copy link
Contributor

is this due to #2314 (comment) ?
specifically, if the event listeners for both oculus-touch-controls and vive-controls are active regardless of whether they are present...

@ngokevin
Copy link
Member Author

Probably. Need to poke around to think of the best solution. @dmarcos would know best. Maybe introduce a property to force event listening that will be disabled by default, but enabled by replayers.

What I don't think will work is trying to detect whether a different controller exists, that might be messy.

@machenmusik
Copy link
Contributor

i think if you're not going to emulate the gamepad api (which would naturally emulate presence) then you need to inject something into the appropriate isControllerPresent to only attach when actively emulating, rather than leaving multiple instances of controls components with active listeners. brings back to mind some of the earlier debates LOL. note that if you have real vive and emulate touch or other supported controls, you would still have problems in all likelihood

@machenmusik
Copy link
Contributor

@dmarcos ? perhaps you can add an emulated property that controls the event listener behavior when not present, as @ngokevin suggests

@ngokevin
Copy link
Member Author

ngokevin commented Apr 6, 2017

#2556

@ngokevin ngokevin closed this as completed Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants