-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Support Gear VR Touchpad controller 0.4.0 #2183
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
Support Gear VR Touchpad controller 0.4.0 #2183
Conversation
…if present. NOTE: Carmel currently defers sending the button down event, and doesn't send touches, so holding down the button to see where you're teleporting doesn't work
dmarcos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels weird to me to incorporate a touchpad as part of hand-controls. I have no idea how you're supposed to control your hands with 2 axis. I feel that the touchpad is more appropriate to be paired with a gazed based cursor. The application should detect if there are tracked controllers and if not used an alternative interaction method (e.g: gazed based cursor) that better adapts to the capabilities of the device
| */ | ||
| module.exports.Component = registerComponent('carmel-gearvr-controls', { | ||
| // since aframe-teleport-controls looks for tracked-controls, add one | ||
| dependencies: ['tracked-controls'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the gearvr controls is just the trackpad on the headset right? I don't think it fits in the tracked-controls models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, but at a higher level, would this make more sense in the registry vs core? I think it's valuable to include, in either case.
Also wondering if the name (and functionality) could be broader than carmel and gearvr. Assuming this is purely using gamepad API, this could be trackpad-controls or dpad-controls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, it is not a tracked-controls really, it only has a stub of that because others like aframe-teleport-controls are looking for entities with that label. it makes hand-controls allow gaze-based usage on Carmel, so that things like aframe-teleport-controls can just reference hand-controls and not worry about specific implementation. if you try https://chenzlabs.github.io/aframe-teleport-controls/mesh/ with Carmel you can see what I mean (swipe and hold, then release).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donmccurdy i agree this could be more generic like touchpad-controls if the behavior were consistent across browsers (not just Carmel) and controllers (not just Gear VR Touchpad), but it is not clear that is the case. happy to rename if that helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this make more sense in the registry vs core?
hand-controls is in core, so AFAIK the only way to make it understand something else is in core...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to gearvr-controls and added support for Samsung Internet GearVR. (The test scene I use looks low-res in that browser for some reason, but the functionality works as expected.)
| dependencies: ['tracked-controls'], | ||
|
|
||
| schema: { | ||
| hand: {default: 'right'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels weird to assign a hand to the trackpad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is for compatibility with hand-controls only
Yes, this gets back to some of the original conversation on #2124 and #2132. These changes allow applications to do that easily by using And rather than having a well-known component responsible for figuring out which controllers are attached and only injecting the right one(s) -- that was |
@dmarcos I just realized, you may not have understood from the description that this is basically what the PR does -- modified the description to make it more obvious that for Carmel GearVR, it is |
|
I think |
|
IMO, there's no particularly good reason why As previously discussed, I think most of this comes up because ugh, but I forgot that the hand-controls schema has nowhere to put a switch at present :-/ |
|
I want to keep |
|
So as things stand there are no examples of what to do with A-Frame on GearVR (and Daydream), I agree with your statement that the tracked-controls example really calls out for Touch and/or Vive controllers, but I think https://chenzlabs.github.io/aframe-teleport-controls/mesh/ shows that the hand-controls component can still be useful in other situations. It sounds as though you are asking those looking to support the most numerous VR platforms by far to go outside A-Frame, rather than also having examples of how to use non-tracked controllers as part of A-Frame. |
|
Maybe all that needs to change here to accommodate your perspective is that If you agree, I will happily make that simple change |
|
Also I'm not sure if a |
|
right now the mouse/touchpad emulation is activated for GearVR when using Samsung Internet VR browser, and there is specific hackery to leverage the Carmel gamepad mapping. The first could be made more generic like the auto-enter discussion, but the second probably shouldn't be. are you suggesting splitting those into two components? |
This is why I push back on this kind of changes. I want to minimize the liabilities in the core. We don't have the resources to pay close attention to each browser, version and device to adapt the code to all the quirks (specially for those in experimental phase). The reason of having the registry is:
The core team will make its best to facilitate the conversation and create a system for people to share, discover and use those components. |
| * For Samsung Internet GearVR browser, it uses mouse and touch events | ||
| * to simulate appropriate Gamepad behavior. | ||
| */ | ||
| module.exports.Component = registerComponent('gearvr-controls', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would definitively add this component to the registry
|
OK, but even with |
|
(the |
The
gearvr-controlscomponent interfaces with the "Gear VR Touchpad"controller exposed by the Carmel and Samsung Internet VR browsers.
As that controller has no pose,
the
tracked-controlscomponent cannot provide its usualfunctionality (but an instance is added anyway since other components such
as
aframe-teleport-controlsuse that to find controller entities). Instead,the
look-controlscomponent is added to mimic a 3DOF controller using HMD orientation,similar to gaze-based cursors.
This component adds button mappings and events, but does not currently provide
a controller model since it is assumed that end users will use this indirectly
through higher level components such as the hand-controls component.
When used via
hand-controls, as there is only one "Gear VR Touchpad",currently this component will only bind to the right hand, not the left.