There's currently no way for a WebXR experience to query/know the positions of the buttons on the controllers. This can be useful for things like rendering tooltips to indicate what each button does. Here's an example video showcasing what that might look like: https://designingvr.org/2018/10/21/tooltips-for-controller-buttons/
In practice, some experiences are now hardcoding these button positions for specific controllers. This in turn can create usability issues when the tooltips don't align when using a different controller.
One possible solution would be to expand the webxr-input-profiles to provide this information. It already provides 3d models for controllers along with their components (incl. buttons). It almost contains the needed information, but can't be used as none of the referenced nodes are reliable indicators of the component's position:
An alternative solution is to expose this information through the WebXR Device API. This would resolve the above issue as well and even work in cases where one doesn't depend on the webxr-input-profiles. For example, an AR application where the physical controllers can be seen in the pass-through view.
There's currently no way for a WebXR experience to query/know the positions of the buttons on the controllers. This can be useful for things like rendering tooltips to indicate what each button does. Here's an example video showcasing what that might look like: https://designingvr.org/2018/10/21/tooltips-for-controller-buttons/
In practice, some experiences are now hardcoding these button positions for specific controllers. This in turn can create usability issues when the tooltips don't align when using a different controller.
One possible solution would be to expand the webxr-input-profiles to provide this information. It already provides 3d models for controllers along with their components (incl. buttons). It almost contains the needed information, but can't be used as none of the referenced nodes are reliable indicators of the component's position:
rootNodeNamelisted in components often doesn't exist in the asset (No matching nodes forrootNodeNamefor many profiles/assets webxr-input-profiles#249)visualResponsesmight be offset to act as a pivotAn alternative solution is to expose this information through the WebXR Device API. This would resolve the above issue as well and even work in cases where one doesn't depend on the
webxr-input-profiles. For example, an AR application where the physical controllers can be seen in the pass-through view.