Skip to content

Instantly share code, notes, and snippets.

@zach-capalbo
Created June 4, 2021 23:21
Show Gist options
  • Save zach-capalbo/af7683c605997838ca9e15a19db435a1 to your computer and use it in GitHub Desktop.
Save zach-capalbo/af7683c605997838ca9e15a19db435a1 to your computer and use it in GitHub Desktop.
A-Frame Reverb G2 Controllers as Oculus touch
// Copy and paste this into the developer console
document.querySelectorAll('*[oculus-touch-controls]').forEach(el => {
el.setAttribute('tracked-controls', 'iterateControllerProfiles', true);
AFRAME.utils.trackedControls.checkControllerPresentAndSetup(el.components['oculus-touch-controls'], 'oculus-touch',
{hand: el.getAttribute('oculus-touch-controls').hand, iterateControllerProfiles: true})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment