-
Notifications
You must be signed in to change notification settings - Fork 53
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
Several default profiles are ambiguous about the presence of a button #70
Comments
Has anyone done the exercise to produce the mappings from today's real-world controllers to the default profiles they can service? Perhaps in practice past a certain complexity controllers always end up having at least one button. I'm actually having trouble thinking of any controllers that have either a thumbstick or touchpad and no app buttons, and so we could define those default profiles to assume a button as well. If such a controller really did come along down the line with those controls but no button, it's unlikely that today's content would have coded defensively to support it anyway, which is the whole point of being explicit about profiles - we can add a new profile then for sites that now have a real controller to reason about. |
I've got an artist building the assets for this repository right now. And we'd be fine with requiring a button be part of a controller that reports 'thumbstick-controller', 'touchpad-controller', or 'thumbstick-touchpad-controller'. The key thing is that we don't want controllers reporting one of those strings if no button is present which is something not clearly stated in the definition of those profiles. |
So in this case, does "touchpad-controller" mean a controller has a trigger button, grip button, and a pressable touchpad? I'm pretty sure we at least expect a trigger button regardless of what controller we are dealing with. However, src/profiles/touchpad-controller/profile.json only seems to specify a pressable touchpad but not trigger or grip buttons. |
Based on this information, I've opted to be more specific about the content of generic profiles. This is now covered in pr #78. |
While working on updating to the xr-gamepad-mappings library to match the latest spec text, I discovered a fairly annoying profile definition issue. I'm expecting to have the library updates posted shortly, but in the meantime I figured I'd get this issue filed for discussion.
The
XRInputSource.getProfiles()
call is designed such that developers can iterate over the list returned and select the best profile they know how to render and interpret. We've defined several default profiles to make this easier such asbutton-controller
,thumbstick-controller
,touchpad-controller
, andtouchpad-thumbstick-controller
. The trouble is we defined the latter three to be ambiguous about whether or not a button is also present. In order to utilize this optional button or render its movement appropriately, developers must also check if the gamepad's mapping isxr-standard
and potentially load/animate a different renderable model.I know it's not ideal to have to define a bunch of additional default profile names (
button-thumbstick-controller
,button-touchpad-controller
,button-touchpad-thumbstick-controller
), but I'm not sure what other better approach there is. I'm super open to ideas though!/cc @thetuvix
The text was updated successfully, but these errors were encountered: