superframe
superframe copied to clipboard
Different Behaviors for Touch and Click using aabb-colider in Mobile devices
In mobile i use cursor=rayOrigin y aabx-colider works fine, but when using other components like a-link fails to follow the link. After some modifications, i ended with conflicts between a-link and aabx-colider on rayOrigin with a script like this:
` AFRAME.registerComponent('link_ext', { init:function(){ var selfEl = this.el; this.el.addEventListener('click',function(evt){
if(isMobile.any()){
window.open('https://physi-enabled.glitch.me','_blank');
}else{
window.open('https://github.com/gasolin/aframe-href-component','_blank');
}
});
}
});
`
At the end i have to decide between AABB-colider and external links. Is any way to make them compatible? this is my project so you can see: https://glitch.com/edit/#!/mobile-adaptation?path=index.html:21:6
Thanks in advance!