-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Attaches event listeners to the controllers controls regardless of th… #2314
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
Conversation
…e presence of physical tracked controllers
d555358 to
24850cc
Compare
|
should the motion capture components be hooked up to the utils and systems portions so the event replay makes it actually appear as though the controllers are present and returning the appropriate pose data? I thought we intentionally abstracted tracked-controls etc. from the actual gamepad API for precisely this purpose... |
|
The capture components won't be part of the core so I prefer them to use the same public API as any others. This change is innocuous for the normal use of the vive/oculus components. We can revisit if it ends up being a problem. |
|
contrary view - the utils and system functions are part of core, allowing
the gamepad api to be wrapped/replaced so that existing APIs can be used
seems better to me than creating the opportunity for dueling systems trying
to fire the same events. and if it can be done with the core API
navigator.getGamepads() etc. then even software that would not be aware of
the emulation would obey...
…On Fri, Jan 27, 2017 at 6:25 PM, Diego Marcos ***@***.***> wrote:
The capture components won't be part of the core so I prefer them to use
the same public API as any others. This change is innocuous for the normal
use of the vive/oculus components. We can revisit if it ends up being a
problem.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2314 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB-_4t4Czy63EalJqYVL4rV_lMCC5BxGks5rWnzVgaJpZM4LuJev>
.
|
|
you may only need to modify / wrap |
|
Monkey patching is difficult to understand and debug in case of problems. it should be used very sparsely. If events name collisions is a problem we can revisit. For the moment I lean toward the simplest solution. |
|
if this doesn't cause problems when using multiple (e.g. both oculus touch and vive), that may work, but for more complex interactions you may need the actual gamepad api values, not just derived events, which is why I mention an alternate strategy of providing mock data and events which at the moment is fed by the tracked-controls utils functions. (rather than monkey patching, exposing API to allow injection... also used for testing anyway, IIRC the controls classes had to provide local overrides for getGamepadsByPrefix for that purpose) |
|
Tested with hand-controls + vive-controls on Vive. @mchen RE: your idea. I think just relying on events and event details are simpler than wrapping or stubbing the whole GamePad API. r+ from me |
|
…e presence of physical tracked controllers (aframevr#2314)
DO NOT MERGE WITHOUT TESTING ON HARDWARE
The code can be reviewed but it needs to be tested with hardware to make sure it works. I'm far from my beloved VR headsets now. If someone can test then we can merge.
This is a requirement from the motion capture components. When reproducing we want the controls to listen to events even if there's no real tracked controls present.