Skip to content

Conversation

@dmarcos
Copy link
Member

@dmarcos dmarcos commented Jan 25, 2017

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.

@machenmusik
Copy link
Contributor

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...

@dmarcos
Copy link
Member Author

dmarcos commented Jan 27, 2017

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.

@machenmusik
Copy link
Contributor

machenmusik commented Jan 27, 2017 via email

@machenmusik
Copy link
Contributor

you may only need to modify / wrap trackedControlsUtils.getGamepadsByPrefix() ...

@dmarcos
Copy link
Member Author

dmarcos commented Jan 27, 2017

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.

@machenmusik
Copy link
Contributor

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)

@ngokevin ngokevin added this to the 0.5.0 milestone Feb 1, 2017
@ngokevin
Copy link
Member

ngokevin commented Feb 1, 2017

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

@machenmusik
Copy link
Contributor

mchen [8:07 PM] 
re: recorder and tracked controller events - the worry I have is that if the app uses both aframe controls and also gamepad api (e.g. arcade), recorder replays may not work well / correctly... and that if during recording playback the gamepad api input isn't turned off, chaos may ensue

[8:08]  
even if you ignore the former, you will probably want to address the latter

ngokevin [8:08 PM] 
you mean you’re not using tracked-controls?

mchen [8:08 PM] 
both tracked-controls (via oculus-touch-controls and vive-controls) and actual gamepad API -- to support actual gamepads, Ooculus remote, etc.

[8:10]  
even if i wasn't, it's not clear that playback would only ever occur without HMD and controllers present/active...

ngokevin [8:10 PM] 
what are some things our recorder would not pick up from your arcade?

[8:10]  
because the gamepad API doesn’t emit events right? you have to poll it for button states

mchen [8:12 PM] 
right.  so there is code that looks at gamepad states, across all of them, and does the right translation into keys for JSMESS emulator to see

[8:13]  
if you are recording tracked controller events only, would fail completely for this case

@dmarcos dmarcos merged commit d4e609a into aframevr:master Feb 1, 2017
ngokevin pushed a commit to pulilab/aframe that referenced this pull request Feb 6, 2017
@machenmusik machenmusik mentioned this pull request Mar 2, 2017
dmarcos added a commit to dmarcos/aframe that referenced this pull request Apr 6, 2017
ngokevin pushed a commit that referenced this pull request Apr 6, 2017
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.

3 participants